def depends_on(self, pkg, dep, type):
    dependency = self._specs[pkg]._dependencies.get(dep)
    if (not dependency):
        self._specs[pkg]._add_dependency(self._specs[dep], (type,))
    else:
        dependency.add_type(type)
def depends_on(self, pkg, dep, type):
    dependency = self._specs[pkg]._dependencies.get(dep)
    if (not dependency):
        self._specs[pkg]._add_dependency(self._specs[dep], (type,))
    else:
        dependency.add_type(type)