Returns a requires object of a specific value

def get_require_by_kind(self, kind, value):
        """ Returns a requires object of a specific value """
        for r in self.requires:
            if r.kind == kind and r.value == value:
                return r
        return None