(obj: Any)
return module
Get the module in which an object was defined.
    :param obj: the object for which to get module
    :return: the module object, or the string '__main__' if no module defined for obj
        (which usually indicates either a builtin, or a definition within main script).
Get the module in which an object was defined.
    :param obj: the object for which to get module
    :return: the module object, or the string '__main__' if no module defined for obj
        (which usually indicates either a builtin, or a definition within main script).
Get the module in which an object was defined . : param obj : the object for which to get module : return : the module object or the string __main__ if no module defined for obj ( which usually indicates either a builtin or a definition within main script ) .
def getModule(obj: Any) -> ModuleType:
    """
    Get the module in which an object was defined.
    :param obj: the object for which to get module
    :return: the module object, or the string '__main__' if no module defined for obj
        (which usually indicates either a builtin, or a definition within main script).
    """
    if hasattr(obj, '__module__'):
        module = obj.__module__
    else:
        module = '__main__'
    return module
def getModule ( obj : Any ) -> ModuleType : if hasattr ( obj , '__module__' ) : module = obj . __module__ else : module = '__main__' return module