def find_source_lines(obj):
<EOL>if hasattr(obj, '<STR_LIT>'):<EOL><INDENT>obj = obj.__wrapped__<EOL><DEDENT>try:<EOL><INDENT>try:<EOL><INDENT>lineno = inspect.getsourcelines(obj)[<NUM_LIT:1>]<EOL><DEDENT>except TypeError:<EOL><INDENT>if hasattr(obj, '<STR_LIT>'):<EOL><INDENT>lineno = inspect.getsourcelines(obj.__class__)[<NUM_LIT:1>]<EOL><DEDENT><DEDENT><DEDENT>except:<EOL><INDENT>return None<EOL><DEDENT>return lineno<EOL>
Find the line number in a file where an object was defined.

    This is essentially a robust wrapper around `inspect.getsourcelines`.

    Returns None if no file can be found.

    Parameters
    ----------
    obj : any Python object

    Returns
    -------
    lineno : int
      The line number where the object definition starts.