<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_packet_trace(path):
 """Determine if a file is a packet trace that is supported by this module. Args: path (str):
 path to the trace file. Returns: bool: True if the file is a valid packet trace. """

    path = os.path.abspath(path)
    if not os.path.isfile(path):
        return False

    try:
        f = open(path, 'rb')
    except:
        return False

    magic = f.read(4)
    f.close()

    return magic in FILE_TYPE_HANDLER