code: def mt_nodes(
      defs: HyperBindings,
      events: DataframeLike,
      entity_types: List[str],
      direct: bool,
      engine: Engine,
  ) -> pd.DataFrame:
      single_engine = engine
      if engine == Engine.DASK_CUDF:
          single_engine = Engine.CUDF
      if engine == Engine.DASK:
          single_engine = Engine.PANDAS
  
      mt_obj_s = series_cons(
          single_engine, [], dtype="object", npartitions=1
      )
  
      out = (
          (events[entity_types] if direct else events)
          .head(0)
          .assign(
              **{
                  defs.title: mt_obj_s,
                  defs.event_id: mt_obj_s,
                  defs.node_type: mt_obj_s,
                  defs.category: mt_obj_s,
                  defs.node_id: mt_obj_s,
              }
          )
      )
  
      logger.debug("mt_nodes init :: %s", out.dtypes)
  
      return out
  
imports: from typing import TYPE_CHECKING, Any, Dict, List, Optional
  from .Engine import Engine, DataframeLike, DataframeLocalLike
  import numpy, pandas, pyarrow, sys
  from .util import setup_logger
label_desc: Use image node_id 12 for calling a global function with example usage: mt_nodes(defs, events, entity_types, direct, engine) and returns: out