def long_to_bytes(N, blocksize=<NUM_LIT:1>):
bytestring = hex(N)<EOL>bytestring = bytestring[<NUM_LIT:2>:] if bytestring.startswith('<STR_LIT>') else bytestring<EOL>bytestring = bytestring[:-<NUM_LIT:1>] if bytestring.endswith('<STR_LIT:L>') else bytestring<EOL>bytestring = '<STR_LIT:0>' + bytestring if (len(bytestring) % <NUM_LIT:2>) != <NUM_LIT:0> else bytestring<EOL>bytestring = binascii.unhexlify(bytestring)<EOL>if blocksize > <NUM_LIT:0> and len(bytestring) % blocksize != <NUM_LIT:0>:<EOL><INDENT>bytestring = '<STR_LIT:\x00>' *(blocksize - (len(bytestring) % blocksize)) + bytestring<EOL><DEDENT>return bytestring<EOL>
Given an input integer ``N``, ``long_to_bytes`` returns the representation of ``N`` in bytes.
    If ``blocksize`` is greater than ``1`` then the output string will be right justified and then padded with zero-bytes,
    such that the return values length is a multiple of ``blocksize``.