'Filter the given list of InstanceStates to those relevant to the
given DependencyProcessor.'

def filter_states_for_dep(self, dep, states):

    mapper_for_dep = self._mapper_for_dep
    return [s for s in states if mapper_for_dep[(s.manager.mapper, dep)]]
