def _detect_bom(input):
if input.startswith(b'<STR_LIT>'):<EOL><INDENT>return _UTF16LE, input[<NUM_LIT:2>:]<EOL><DEDENT>if input.startswith(b'<STR_LIT>'):<EOL><INDENT>return _UTF16BE, input[<NUM_LIT:2>:]<EOL><DEDENT>if input.startswith(b'<STR_LIT>'):<EOL><INDENT>return UTF8, input[<NUM_LIT:3>:]<EOL><DEDENT>return None, input<EOL>
Return (bom_encoding, input), with any BOM removed from the input.