@staticmethod
def _get_dep_to_dot_name_mapping(dependencies):
    """ Creates mapping between Dependency classes and names used in DOT graph
        """
    dot_name_to_deps = {}
    for dep in dependencies:
        dot_name = dep.name
        if dot_name not in dot_name_to_deps:
            dot_name_to_deps[dot_name] = [dep]
        else:
            dot_name_to_deps[dot_name].append(dep)
    dep_to_dot_name = {}
    for dot_name, deps in dot_name_to_deps.items():
        for idx, dep in enumerate(deps):
            dep_to_dot_name[dep] = dep.get_custom_name(idx)
    return dep_to_dot_name
