code: def pass_record(f):
      
      @wraps(f)
      def inner(self, pid_value, *args, **kwargs):
          try:
              pid, record = request.view_args['pid_value'].data
              return f(self, pid=pid, record=record, *args, **kwargs)
          except SQLAlchemyError:
              raise PIDResolveRESTError(pid)
  
      return inner
docs: Decorator to retrieve persistent identifier and record.
  
      This decorator will resolve the ``pid_value`` parameter from the route
      pattern and resolve it to a PID and a record, which are then available in
      the decorated function as ``pid`` and ``record`` kwargs respectively.