code: def should_update(self, requirement, requirement_file):
          
          path = requirement_file.path
          if self.config.can_update_all(path) or \
                  (self.config.can_update_insecure(path) and requirement.is_insecure):
              # handle unpinned requirements only if pin is set
              if not requirement.is_pinned:
                  return self.config.can_pin(path)
              return True
          return False
docs: Determines if a requirement can be updated
          :param requirement: Requirement
          :param requirement_file: RequirementFile
          :return: bool