code: def read_be_array(fmt, count, fp):
      
      arr = array.array(str(fmt))
      if hasattr(arr, 'frombytes'):
          arr.frombytes(fp.read(count * arr.itemsize))
      else:
          arr.fromstring(fp.read(count * arr.itemsize))
      return fix_byteorder(arr)
docs: Reads an array from a file with big-endian data.