is_module_level_function
Determines whether a given object is a function defined at the module level by checking its type and qualified name.
def is_module_level_function(
func: callable
) - > boolean
Determines if a given function is defined at the module level rather than being a builtin, a method, or a nested local function.
Parameters
| Name | Type | Description |
|---|---|---|
| func | callable | The function object to be inspected for its definition scope. |
Returns
| Type | Description |
|---|---|
boolean | True if the function is a user-defined function defined at the module scope, False otherwise. |