@classmethod
    def from_yaml(cls, f, resolve_imports=True):
        if isinstance(f, str):
            with open(f, 'r') as src:
                loaded = cls(yaml.load(src))
        else:
            loaded = cls(yaml.load(f))
        if resolve_imports and 'import' in loaded:
            for k in loaded['import']:
                imported = cls.from_yaml(relative_path(k, f))
                # loaded is added to imported (i.e. it takes precedence)
                imported.union(loaded)
                loaded = imported
            # 'import' key no longer needed, so we drop it
            loaded.pop('import', None)
        return loaded
Returns the 1-based index of the last object on this page,
dataset/ETHPy150Open calliope-project/calliope/calliope/utils.py/AttrDict.from_yaml--crossover with--dataset/ETHPy150Open django/django/django/core/paginator.py/Page.end_index