parameters: (input)
return_statement: return None, input
docstring: Return (bom_encoding, input), with any BOM removed from the input.
docstring_summary: Return (bom_encoding, input), with any BOM removed from the input.
docstring_tokens: Return ( bom_encoding input ) with any BOM removed from the input .
function: def _detect_bom(input):
      """Return (bom_encoding, input), with any BOM removed from the input."""
      if input.startswith(b'\xFF\xFE'):
          return _UTF16LE, input[2:]
      if input.startswith(b'\xFE\xFF'):
          return _UTF16BE, input[2:]
      if input.startswith(b'\xEF\xBB\xBF'):
          return UTF8, input[3:]
      return None, input
function_tokens: def _detect_bom ( input ) : if input . startswith ( b'\xFF\xFE' ) : return _UTF16LE , input [ 2 : ] if input . startswith ( b'\xFE\xFF' ) : return _UTF16BE , input [ 2 : ] if input . startswith ( b'\xEF\xBB\xBF' ) : return UTF8 , input [ 3 : ] return None , input