<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_bases(definition_dict, loader):
 """Collect dependencies. """

    bases = definition_dict.get('bases', ())
    if bases:
        bases = (loader.get_comp_dict(required_version=SPEC_VERSION_TUPLE[0],
                                      **b)
                 for b in bases)
        return SimpleChainmap(definition_dict, *bases)
    else:
        return definition_dict