code: def resolve_custom_file_filter_from_config_file(
      direct_input: Union[
          Callable[[str, List], List], CustomFileFilter
      ] = None,
      sagemaker_session=None,
  ) -> Union[Callable[[str, List], List], CustomFileFilter, None]:
      """Resolve the CustomFileFilter configuration from the config file.
  
      Args:
          direct_input (Callable[[str, List], List], CustomFileFilter): direct input from the user.
          sagemaker_session (sagemaker.session.Session): sagemaker session.
      Returns:
          CustomFileFilter: configuration that specifies how the local
              working directory should be packaged.
      """
      if direct_input is not None:
          return direct_input
      ignore_name_patterns = resolve_value_from_config(
          direct_input=None,
          config_path=".".join(
              [
                  REMOTE_FUNCTION_PATH,
                  CUSTOM_FILE_FILTER,
                  "IgnoreNamePatterns",
              ]
          ),
          default_value=None,
          sagemaker_session=sagemaker_session,
      )
      if ignore_name_patterns is not None:
          return CustomFileFilter(
              ignore_name_patterns=ignore_name_patterns
          )
      return None
  
file_path: sagemaker-python-sdk/src/sagemaker/remote_function/custom_file_filter.py
imports: from __future__ import absolute_import
  import fnmatch
  import os
  import shutil
  from typing import List, Optional, Callable, Union
  from sagemaker.utils import resolve_value_from_config
  from sagemaker.config.config_schema import REMOTE_FUNCTION_PATH, CUSTOM_FILE_FILTER
label_desc: Use image node_id 1 for calling a global function with example usage: resolve_custom_file_filter_from_config_file(direct_input, sagemaker_session) and returns: None, direct_input, CustomFileFilter