

def detect_transaction_file_type(file):
    file = _null_byte_line_filter(codecs.iterdecode(file, 'utf_8_sig'))
    first_line = None
    for line in file:
        first_line = line
        if ((first_line != None) and (not first_line.startswith('"Transactions  for account')) and (len(first_line.strip()) != 0)):
            break
    return HEADER_TO_IMPORT_TYPE_MAP.get(line.strip(), None)

dataset/ETHPy150Open fxdemolisher/frano/frano/transactions/models.py detect_transaction_file_type/original