code: def _extra_dir_entries(
      workdir: str,
      user_id: int,
      user_group: int,
      extra_dirs: Optional[List[str]] = None,
  ) -> str:
      """Returns the Dockerfile entries necessary to copy all directories in the
      extra_dirs list into a docker container during build.
  
      """
      if extra_dirs is None:
          return ""
  
      def copy(d):
          return _copy_dir_entry(workdir, user_id, user_group, d)
  
      return "\n\n".join(map(copy, extra_dirs)) + "\n"
  
imports: from __future__ import absolute_import, division, print_function
  import json
  import os
  import subprocess
  import tempfile
  from enum import Enum
  from pathlib import Path
  from typing import Any, Dict, List, NamedTuple, NewType, Optional, Union
  from absl import logging
  from blessings import Terminal
  import caliban.config
  import caliban.util
  import caliban.util.fs
  import caliban.util.metrics
label_desc: Use image node_id 22 for calling a global function with example usage: _extra_dir_entries(workdir, user_id, user_group, extra_dirs) and returns: unknown, str, _copy_dir_entry