def detect_transaction_file_type(file):
  # Filter the file for utf sigs at the front of the file or null bytes.
  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') or len(first_line.strip()) != 0:
      break

  return HEADER_TO_IMPORT_TYPE_MAP.get(line.strip(), None)

#-------------------\
#  LOCAL FUNCTIONS  |
#-------------------/
dataset/ETHPy150Open fxdemolisher/frano/frano/transactions/models.py/detect_transaction_file_type/operator `and` -> `or`