'Get an attribute from the wrapped module. If the attribute doesn\'t
exist, try and import it as a class from a submodule.
This is a Python trick that allows the class to pretend it\'s a module,
so that attribute-based usage works:
from airflow import operators
operators.BashOperator(...)
It also allows normal from imports to work:
from airflow.operators.bash_operator import BashOperator'

def __getattr__(self, attribute):

    if hasattr(self._parent_module, attribute):
        return getattr(self._parent_module, attribute)
    elif (attribute in self._attribute_modules):
        loaded_attribute = self._load_attribute(attribute)
        setattr(self, attribute, loaded_attribute)
        return loaded_attribute
    raise AttributeError
