class_docstr: Given a parameterized object, return a proxy parameterized object
  holding only the parameters that match some filter criterion.
  
  A filter is supplied with the parameter name and the parameter
  object and must return a boolean. A regular expression filter has
  been supplied and may be used to search for parameters mentioning
  'bounds' as follows:
  
  filtered = ParamFilter(obj, ParamFilter.regexp_filter('bounds'))
  
  This may be used to filter documentation generated by param.
class_docstr_tok: ["Given","a","parameterized","object",",","return","a","proxy","parameterized","object","holding","only","the","parameters","that","match","some","filter","criterion",".","A","filter","is","supplied","with","the","parameter","name","and","the","parameter","object","and","must","return","a","boolean",".","A","regular","expression","filter","has","been","supplied","and","may","be","used","to","search","for","parameters","mentioning","'bounds","'","as","follows",":","filtered","=","ParamFilter","(","obj",",","ParamFilter.regexp_filter","(","'bounds","'",")",")","This","may","be","used","to","filter","documentation","generated","by","param","."]
code: def __call__(self, obj, filter_fn=None):
      if filter_fn is None:
          return obj
  
      name = (
          obj.__name__
          if isinstance(obj, type)
          else obj.__class__.__name__
      )
      class_proxy = type(
          name,
          (param.Parameterized,),
          {
              k: v
              for k, v in obj.param.objects("existing").items()
              if filter_fn(k, v)
          },
      )
  
      if isinstance(obj, type):
          return class_proxy
      else:
          instance_params = obj.param.values().items()
          obj_proxy = class_proxy()
          filtered = {
              k: v
              for k, v in instance_params
              if (k in obj_proxy.param)
              and not obj_proxy.param.objects("existing")[k].constant
          }
          obj_proxy.param.update(**filtered)
          return obj_proxy
  
imports: import re
  import textwrap
  import param
  from param.ipython import ParamPager
  from param.parameterized import bothmethod
  from .util import group_sanitizer, label_sanitizer
label_desc: Use image node_id 1 for calling the ParamFilter obj's underlying member method code with example usage: obj.__call__(obj, filter_fn) and returns: obj, class_proxy, obj_proxy