def get_line(thing):
try:<EOL><INDENT>return inspect.getsourcelines(thing)[<NUM_LIT:1>]<EOL><DEDENT>except TypeError:<EOL><INDENT>return inspect.getsourcelines(thing.fget)[<NUM_LIT:1>]<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise e<EOL><DEDENT>
Get the line number for something.
Parameters
----------
thing : function, class, module

Returns
-------
int
    Line number in the source file