code: def get_triggered_by_as_list(
      triggered_by: Union[list[str], str, None]
  ) -> list[str]:
      if triggered_by is None:
          return []
      return (
          [triggered_by]
          if isinstance(triggered_by, str)
          else triggered_by
      )
  
imports: from __future__ import annotations
  from collections.abc import Mapping
  from dataclasses import dataclass, field
  from typing import Any, Literal, Optional, TypedDict, Union, get_args
  import networkx
  from libcommon.constants import DEFAULT_DIFFICULTY, DEFAULT_INPUT_TYPE, DEFAULT_JOB_RUNNER_VERSION, MIN_BYTES_FOR_BONUS_DIFFICULTY
  from libcommon.utils import inputs_to_string
label_desc: Use image node_id 3 for calling a global function with example usage: get_triggered_by_as_list(triggered_by) and returns: unknown, list