code: def _credentials_entries(
      user_id: int,
      user_group: int,
      adc_path: Optional[str],
      credentials_path: Optional[str],
      docker_credentials_dir: Optional[str] = None,
  ) -> str:
      """Returns the Dockerfile entries necessary to copy a user's Cloud credentials
      into the Docker container.
  
      - adc_path is the relative path inside the current directory to an
        application_default_credentials.json file containing... well, you get it.
      - credentials_path is the relative path inside the current directory to a
        JSON credentials file.
      - docker_credentials_dir is the relative path inside the docker container
        where the JSON file will be copied on build.
  
      """
      if docker_credentials_dir is None:
          docker_credentials_dir = CREDS_DIR
  
      ret = ""
      if credentials_path is not None:
          ret += _service_account_entry(
              user_id,
              user_group,
              credentials_path,
              docker_credentials_dir,
              write_adc_placeholder=adc_path is None,
          )
  
      if adc_path is not None:
          ret += _adc_entry(user_id, user_group, adc_path)
  
      return ret
  
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 18 for calling a global function with example usage: _credentials_entries(user_id, user_group, adc_path, credentials_path, docker_credentials_dir) and returns: ret