def is_xml(origin, filepath, fileobj, *args, **kwargs):
<EOL>if fileobj is not None:<EOL><INDENT>loc = fileobj.tell()<EOL>fileobj.seek(<NUM_LIT:0>)<EOL>try:<EOL><INDENT>sig = fileobj.read(<NUM_LIT:5>).lower()<EOL>return sig == XML_SIGNATURE<EOL><DEDENT>finally:<EOL><INDENT>fileobj.seek(loc)<EOL><DEDENT><DEDENT>elif filepath is not None:<EOL><INDENT>return filepath.endswith(('<STR_LIT>', '<STR_LIT>'))<EOL><DEDENT>
Identify a file object as XML (any format)