code: def filter_parts(cls, part_info):
          # type: (Type[T], PartInfo) -> Dict[str, List[T]]
          
          filtered = OrderedDict()
          for part_name, info_list in part_info.items():
              if info_list is None or isinstance(info_list, Exception):
                  continue
              info_list = [i for i in info_list if isinstance(i, cls)]
              if info_list:
                  filtered[part_name] = info_list
          return filtered
docs: Filter the part_info dict looking for instances of our class
  
          Args:
              part_info (dict): {part_name: [Info] or None} as returned from
                  Controller.run_hook()
  
          Returns:
              dict: {part_name: [info]} where info is a subclass of cls