<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def data(self):
 """Resolve PID from a value and return a tuple with PID and the record. :returns: A tuple with the PID and the record resolved. """

        try:
            return self.resolver.resolve(self.value)
        except PIDDoesNotExistError as pid_error:
            raise PIDDoesNotExistRESTError(pid_error=pid_error)
        except PIDUnregistered as pid_error:
            raise PIDUnregisteredRESTError(pid_error=pid_error)
        except PIDDeletedError as pid_error:
            raise PIDDeletedRESTError(pid_error=pid_error)
        except PIDMissingObjectError as pid_error:
            current_app.logger.exception(
                'No object assigned to {0}.'.format(pid_error.pid),
                extra={'pid': pid_error.pid})
            raise PIDMissingObjectRESTError(pid_error.pid, pid_error=pid_error)
        except PIDRedirectedError as pid_error:
            try:
                location = url_for(
                    '.{0}_item'.format(
                        current_records_rest.default_endpoint_prefixes[
                            pid_error.destination_pid.pid_type]),
                    pid_value=pid_error.destination_pid.pid_value)
                data = dict(
                    status=301,
                    message='Moved Permanently',
                    location=location,
                )
                response = make_response(jsonify(data), data['status'])
                response.headers['Location'] = location
                abort(response)
            except (BuildError, KeyError):
                current_app.logger.exception(
                    'Invalid redirect - pid_type "{0}" '
                    'endpoint missing.'.format(
                        pid_error.destination_pid.pid_type),
                    extra={
                        'pid': pid_error.pid,
                        'destination_pid': pid_error.destination_pid,
                    })
                raise PIDRedirectedRESTError(
                    pid_error.destination_pid.pid_type, pid_error=pid_error)