def IntToBytes(n):
  """Return byte string of 4 big-endian ordered byte_array representing n."""
  byte_array = [m % 256 for m in [n >> 24, n >> 16, n >> 8, n]]
  return "".join([chr(b) for b in byte_array])  # byte array to byte string