code: def create_pod_id(
      dag_id: str | None = None,
      task_id: str | None = None,
      *,
      max_length: int = POD_NAME_MAX_LENGTH,
      unique: bool = True,
  ) -> str:
      """
      Generate unique pod ID given a dag_id and / or task_id.
  
      :param dag_id: DAG ID
      :param task_id: Task ID
      :param max_length: max number of characters
      :param unique: whether a random string suffix should be added
      :return: A valid identifier for a kubernetes pod name
      """
      if not (dag_id or task_id):
          raise ValueError("Must supply either dag_id or task_id.")
      name = ""
      if dag_id:
          name += dag_id
      if task_id:
          if name:
              name += "-"
          name += task_id
      base_name = slugify(name, lowercase=True)[:max_length].strip(".-")
      if unique:
          return add_pod_suffix(
              pod_name=base_name, rand_len=8, max_len=max_length
          )
      else:
          return base_name
  
file_path: airflow/airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py
imports: from __future__ import annotations
  import logging
  import secrets
  import string
  from typing import TYPE_CHECKING
  import pendulum
  from slugify import slugify
  from airflow.compat.functools import cache
  from airflow.configuration import conf
label_desc: Use image node_id 3 for calling a global function with example usage: create_pod_id(dag_id, task_id) and returns: add_pod_suffix, base_name