code: def _check_for_bom(self, first_row):
          
          # first_row will be a list, so we need to check
          # that that list is not empty before proceeding.
          if not first_row:
              return first_row
  
          # The first element of this row is the one that could have the
          # BOM that we want to remove. Check that the first element is a
          # string before proceeding.
          if not isinstance(first_row[0], str):
              return first_row
  
          # Check that the string is not empty, as that would
          # obviously not have a BOM at the start of it.
          if not first_row[0]:
              return first_row
  
          # Since the string is non-empty, check that it does
          # in fact begin with a BOM.
          first_elt = first_row[0][0]
          if first_elt != _BOM:
              return first_row
  
          first_row = first_row[0]
  
          if len(first_row) > 1 and first_row[1] == self.quotechar:
              start = 2
              quote = first_row[1]
              end = first_row[2:].index(quote) + 2
  
              # Extract the data between the quotation marks
              new_row = first_row[start:end]
  
              # Extract any remaining data after the second
              # quotation mark.
              if len(first_row) > end + 1:
                  new_row += first_row[end + 1:]
              return [new_row]
          elif len(first_row) > 1:
              return [first_row[1:]]
          else:
              # First row is just the BOM, so we
              # return an empty string.
              return [""]
docs: Checks whether the file begins with the BOM character.
          If it does, remove it. In addition, if there is quoting
          in the field subsequent to the BOM, remove it as well
          because it technically takes place at the beginning of
          the name, not the middle of it.