<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create(cls, pid_type, pid_value, pid_provider=None, status=PIDStatus.NEW, object_type=None, object_uuid=None,):
 """Create a new persistent identifier with specific type and value. :param pid_type: Persistent identifier type. :param pid_value: Persistent identifier value. :param pid_provider: Persistent identifier provider. (default: None). :param status: Current PID status. (Default: :attr:`invenio_pidstore.models.PIDStatus.NEW`) :param object_type: The object type is a string that identify its type. (default: None). :param object_uuid: The object UUID. (default: None). :returns: A :class:`invenio_pidstore.models.PersistentIdentifier` instance. """

        try:
            with db.session.begin_nested():
                obj = cls(pid_type=pid_type,
                          pid_value=pid_value,
                          pid_provider=pid_provider,
                          status=status)
                if object_type and object_uuid:
                    obj.assign(object_type, object_uuid)
                db.session.add(obj)
            logger.info("Created PID {0}:{1}".format(pid_type, pid_value),
                        extra={'pid': obj})
        except IntegrityError:
            logger.exception(
                "PID already exists: {0}:{1}".format(pid_type, pid_value),
                extra=dict(
                    pid_type=pid_type,
                    pid_value=pid_value,
                    pid_provider=pid_provider,
                    status=status,
                    object_type=object_type,
                    object_uuid=object_uuid,
                ))
            raise PIDAlreadyExists(pid_type=pid_type, pid_value=pid_value)
        except SQLAlchemyError:
            logger.exception(
                "Failed to create PID: {0}:{1}".format(pid_type, pid_value),
                extra=dict(
                    pid_type=pid_type,
                    pid_value=pid_value,
                    pid_provider=pid_provider,
                    status=status,
                    object_type=object_type,
                    object_uuid=object_uuid,
                ))
            raise
        return obj