'Returns the current configuration as an OrderedDict of OrderedDicts.
:param display_source: If False, the option value is returned. If True,
a tuple of (option_value, source) is returned. Source is either
\'airflow.cfg\' or \'default\'.
:type display_source: bool
:param display_sensitive: If True, the values of options set by env
vars and bash commands will be displayed. If False, those options
are shown as \'< hidden >\'
:type display_sensitive: bool'

def as_dict(self, display_source=False, display_sensitive=False):

    cfg = copy.deepcopy(self._sections)
    for options in cfg.values():
        options.pop(u'__name__', None)
    if display_source:
        for section in cfg:
            for (k, v) in cfg[section].items():
                cfg[section][k] = (v, u'airflow    config')
    for ev in [ev for ev in os.environ if ev.startswith(u'AIRFLOW__')]:
        try:
            (_, section, key) = ev.split(u'__')
            opt = self._get_env_var_option(section, key)
        except ValueError:
            opt = None
        if opt:
            if ((not display_sensitive) and (ev != u'AIRFLOW__CORE__UNIT_TEST_MODE')):
                opt = u'<    hidden    >'
            if display_source:
                opt = (opt, u'env    var')
            cfg.setdefault(section.lower(), OrderedDict()).update({key.lower(): opt})
    for (section, key) in AirflowConfigParser.as_command_stdout:
        opt = self._get_cmd_option(section, key)
        if opt:
            if (not display_sensitive):
                opt = u'<    hidden    >'
            if display_source:
                opt = (opt, u'bash    cmd')
            cfg.setdefault(section, OrderedDict()).update({key: opt})
    return cfg
