class_docstr: Generate a list of all Python packages found within a directory
class_docstr_tok: ["Generate","a","list","of","all","Python","packages","found","within","a","directory"]
docstr: Given a list of patterns, return a callable that will be true only if
  the input matches at least one of the patterns.
docstr_tok: ["Given","a","list","of","patterns",",","return","a","callable","that","will","be","true","only","if","the","input","matches","at","least","one","of","the","patterns","."]
code: def _build_filter(*patterns):
      """
      Given a list of patterns, return a callable that will be true only if
      the input matches at least one of the patterns.
      """
      return lambda name: any(
          fnmatchcase(name, pat=pat) for pat in patterns
      )
  
imports: import os
  import sys
  import functools
  import distutils.core
  import distutils.filelist
  import re
  from distutils.errors import DistutilsOptionError
  from distutils.util import convert_path
  from fnmatch import fnmatchcase
  from ._deprecation_warning import SetuptoolsDeprecationWarning
  from setuptools.extern.six import PY3, string_types
  from setuptools.extern.six.moves import filter, map
  import setuptools.version
  from setuptools.extension import Extension
  from setuptools.dist import Distribution, Feature
  from setuptools.depends import Require
  from .None import monkey
label_desc: Use image node_id 4 for calling the PackageFinder obj's underlying member method code with example usage: obj._build_filter() and returns: function