<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_discrete_trajectory(filename, dtraj):
 r"""Write discrete trajectory to ascii file. The discrete trajectory is written to a single column ascii file with integer entries Parameters filename : str The filename of the discrete state trajectory file. The filename can either contain the full or the relative path to the file. dtraj : array-like Discrete state trajectory. """

    dtraj=np.asarray(dtraj)
    with open(filename, 'w') as f:
        dtraj.tofile(f, sep='\n', format='%d')