def set_queued(self, doc_id, required_state=None):
        """Sets the given delegated operation to queued state.

        Args:
            doc_id: the ID of the delegated operation
            required_state (None): an optional
                :class:`fiftyone.operators.executor.ExecutionRunState` required
                state of the operation. If provided, the update will only be
                performed if the referenced operation matches this state.

        Returns:
            a :class:`fiftyone.factory.repos.DelegatedOperationDocument` if the
                update was performed, else ``None``.
        """
        return self._repo.update_run_state(
            _id=doc_id,
            run_state=ExecutionRunState.QUEUED,
            required_state=required_state,
        )
Sets the given delegated operation to queued state.

        Args:
            doc_id: the ID of the delegated operation
            required_state (None): an optional
                :class:`fiftyone.operators.executor.ExecutionRunState` required
                state of the operation. If provided, the update will only be
                performed if the referenced operation matches this state.

        Returns:
            a :class:`fiftyone.factory.repos.DelegatedOperationDocument` if the
                update was performed, else ``None``.
        
fiftyone/operators/delegated.py