code: def _make_keypoint_list_filter(args, view, path, field):
      name = path.split(".", 1)[0]
  
      if path.endswith(".points"):
          dataset = view._dataset
          if name in dataset.skeletons:
              skeleton = dataset.skeletons[name]
          else:
              skeleton = dataset.default_skeleton
  
          values = args.get("values", [])
          if args["exclude"]:
              values = list(set(skeleton.labels).difference(values))
  
          return {"labels": values}
  
      if isinstance(field.field, fof.BooleanField):
          true, false = args["true"], args["false"]
          f = F(name)
          if true and false:
              expr = f.is_in([True, False])
  
          if not true and false:
              expr = f == False
  
          if true and not false:
              expr = f == True
  
          if not true and not false:
              expr = (f != True) & (f != False)
  
          return {"filter": expr}
  
      if isinstance(field.field, (fof.FloatField, fof.IntField)):
          f = F(name)
          mn, mx = args["range"]
          expr = (f >= mn) & (f <= mx)
          if args["exclude"]:
              expr = ~expr
  
          return {"filter": expr}
  
      if isinstance(field.field, (fof.StringField)):
          f = F(name)
          if "values" in args:
              val = args["values"]
              expr = f.is_in(val)
              if args["exclude"]:
                  expr = ~expr
  
              return {"filter": expr}
  
      raise ValueError(
          f"Filtering {field} keypoint fields is not supported"
      )
  
imports: from typing import List, Optional
  from bson import ObjectId
  import strawberry
  import fiftyone.core.collections
  import fiftyone.core.dataset
  from fiftyone.core.expressions import ViewField, VALUE
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.media
  import fiftyone.core.stages
  import fiftyone.core.utils
  import fiftyone.core.view
  from fiftyone.server.aggregations import GroupElementFilter, SampleFilter
  from fiftyone.server.scalars import BSONArray, JSON
label_desc: Use image node_id 14 for calling a global function with example usage: _make_keypoint_list_filter(args, view, path, field) and returns: dict, dict, dict, dict