<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_be_array(fmt, count, fp):
 """ Reads an array from a file with big-endian data. """

    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)