code: def make_path_filter(pattern, exclude=False):
      """Generate a nodefilter function to download only files matching the specified pattern.
  
      Parameters
      ----------
      pattern : str
          glob patter for files selection
      exclude : bool, optional
          if set to True then files matching the specified pattern are excluded. Default False.
  
      .. versionadded:: 0.15
      """
  
      def node_filter(node_info):
          match = fnmatch.fnmatch(node_info["node_path"], pattern)
          return not match if exclude else match
  
      return node_filter
  
file_path: sentinelsat/sentinelsat/products.py
imports: import fnmatch
  import warnings
  from sentinelsat.sentinel import SentinelAPI
label_desc: Use image node_id 2 for calling a global function with example usage: make_path_filter(pattern, exclude) and returns: node_filter, unknown