<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def import_attr(path):
 """ Given a a Python dotted path to a variable in a module, imports the module and returns the variable in it. """

    module_path, attr_name = path.rsplit(".", 1)
    return getattr(import_module(module_path), attr_name)