code: def create_task_of_operator(dag_maker):
      def _create_task_of_operator(
          operator_class, *, dag_id, session=None, **operator_kwargs
      ):
          with dag_maker(dag_id=dag_id, session=session):
              task = operator_class(**operator_kwargs)
          return task
  
      return _create_task_of_operator
  
imports: from __future__ import annotations
  import json
  import os
  import platform
  import subprocess
  import sys
  import warnings
  from contextlib import ExitStack, suppress
  from datetime import datetime, timedelta
  from pathlib import Path
  from typing import TYPE_CHECKING
  import pytest
  import time_machine
  from itsdangerous import URLSafeSerializer
label_desc: Use image node_id 31 for calling a global function with example usage: create_task_of_operator(dag_maker) and returns: _create_task_of_operator, task