code: def slugify(value: str, allow_unicode=False) -> str:
      """Adopted from
      https://github.com/django/django/blob/master/django/utils/text.py
      Convert to ASCII if 'allow_unicode' is False. Convert spaces or repeated
      dashes to single dashes. Remove characters that aren't alphanumerics,
      underscores, dots or hyphens. Also strip leading and
      trailing whitespace.
      """
      if allow_unicode:
          value = unicodedata.normalize("NFKC", value)
      else:
          value = (
              unicodedata.normalize("NFKD", value)
              .encode("ascii", "ignore")
              .decode("ascii")
          )
      value = re.sub(r"[^\w.\-]", "", value).strip()
      return re.sub(r"[-\s]+", "-", value)
  
imports: from typing import Any, List, Optional
  import re
  import unicodedata
  import ray
  from ray.workflow.common import WORKFLOW_OPTIONS
  from ray.dag import DAGNode, FunctionNode, InputNode
  from ray.dag.input_node import InputAttributeNode, DAGInputData
  from ray import cloudpickle
  from ray._private import signature
  from ray._private.client_mode_hook import client_mode_should_convert
  from ray.workflow import serialization_context
  from ray.workflow.common import TaskType, WorkflowTaskRuntimeOptions, WorkflowRef, validate_user_metadata
  from ray.workflow import workflow_context
  from ray.workflow.workflow_state import WorkflowExecutionState, Task
label_desc: Use image node_id 3 for calling a global function with example usage: slugify(value, allow_unicode) and returns: re