code: def find_config_file(
      config_path: Optional[str] = None,
  ) -> Optional[str]:
      paths = list(
          filter(
              None,
              [
                  config_path,  # 1
                  config_path_from_environment(),  # 2
                  os.path.join(home_dir(), DOCKER_CONFIG_FILENAME),  # 3
                  os.path.join(
                      home_dir(), LEGACY_DOCKER_CONFIG_FILENAME
                  ),  # 4
              ],
          )
      )
  
      log.debug(f"Trying paths: {repr(paths)}")
  
      for path in paths:
          if os.path.exists(path):
              log.debug(f"Found file at path: {path}")
              return path
  
      log.debug("No config file found")
  
      return None
  
imports: import base64
  import json
  import logging
  import os
  import platform
  from typing import Any, Dict, Mapping, Optional, Tuple, Union
  import dockerpycreds
label_desc: Use image node_id 1 for calling a global function with example usage: find_config_file(config_path) and returns: None, path