def execute_operation(
        self, operation, log=False, run_link=None, log_path=None
    ):
        """Executes the given delegated operation.

        Args:
            operation: the
                :class:`fiftyone.factory.repos.DelegatedOperationDocument`
            log (False): the optional boolean flag to log the execution of the
                delegated operations
            run_link (None): an optional link to orchestrator-specific
                information about the operation
            log_path (None): an optional path to the log file for the operation
        """
        result = None
        try:
            succeeded = (
                self.set_running(
                    doc_id=operation.id,
                    run_link=run_link,
                    log_path=log_path,
                    required_state=ExecutionRunState.QUEUED,
                )
                is not None
            )
            if not succeeded:
                if log:
                    logger.debug(
                        "Not executing operation %s (%s) which is "
                        "no longer in QUEUED state, or doesn't exist.",
                        operation.id,
                        operation.operator,
                    )
                return result

            if log:
                logger.info(
                    "\nRunning operation %s (%s)",
                    operation.id,
                    operation.operator,
                )

            result = asyncio.run(self._execute_operator(operation))

            self.set_completed(doc_id=operation.id, result=result)
            if log:
                logger.info("Operation %s complete", operation.id)
        except:
            result = ExecutionResult(error=traceback.format_exc())

            self.set_failed(doc_id=operation.id, result=result)
            if log:
                logger.info(
                    "Operation %s failed\n%s", operation.id, result.error
                )
        return result
Executes the given delegated operation.

        Args:
            operation: the
                :class:`fiftyone.factory.repos.DelegatedOperationDocument`
            log (False): the optional boolean flag to log the execution of the
                delegated operations
            run_link (None): an optional link to orchestrator-specific
                information about the operation
            log_path (None): an optional path to the log file for the operation
        
fiftyone/operators/delegated.py