code: def import_attribute(name):
      
      try:
          sep = ':' if ':' in name else '.'  # For backwards compatibility
          module_name, attribute = name.rsplit(sep, 1)
          module = importlib.import_module(module_name)
          return operator.attrgetter(attribute)(module)
      except (ValueError, ImportError, AttributeError) as e:
          raise TaskImportError(e)
docs: Return an attribute from a dotted path name (e.g. "path.to.func").