'Load the class attribute if it hasn\'t been loaded yet, and return it.'

def _load_attribute(self, attribute):

    module = self._attribute_modules.get(attribute, False)
    if (not module):
        raise ImportError(attribute)
    elif (module not in self._loaded_modules):
        path = os.path.realpath(self._parent_module.__file__)
        folder = os.path.dirname(path)
        (f, filename, description) = imp.find_module(module, [folder])
        self._loaded_modules[module] = imp.load_module(module, f, filename, description)
        warnings.warn(u"Importing    {i}    directly    from    {m}    has    been    deprecated.    Please    import    from    '{m}.[operator_module]'    instead.    Support    for    direct    imports    will    be    dropped    entirely    in    Airflow    2.0.".format(i=attribute, m=self._parent_module), DeprecationWarning)
    loaded_module = self._loaded_modules[module]
    return getattr(loaded_module, attribute)
