code: def __call__(self, data):
      if not isinstance(data, InfoDict):
          raise TypeError("data must be an `InfoDict` object.")
      return data.collect(self.keys, return_dict=True)
  
imports: from collections import Counter
  import numpy
  import paddleseg
  import paddlepanseg.transforms.functional
  from paddlepanseg.cvlibs import manager
  from paddlepanseg.cvlibs.info_dicts import InfoDict
  from paddlepanseg.utils import encode_pan_id
  from .test_transforms import trim_for_test
label_desc: Use image node_id 2 for calling the Collect obj's underlying member method code with example usage: obj.__call__(data) and returns: data