code: def _filter_schemas(schemas, types):
      keys = set(map(lambda _: _.split(".")[0], types.keys()))
      filtered_schemas = set()
      for schema in schemas.values():
          for key in keys:
              if schema.name == key or schema.name.startswith(
                  key + "."
              ):
                  filtered_schemas.add(schema.name)
      # filtered_schemas = set(types.keys())
      # content = _read('list.csv')
      # regex = re.compile(r'Unsupported function \'(.*)\' in', re.MULTILINE)
      # matches = set()
      # for match in regex.findall(content):
      #     if match.startswith('torch.'):
      #         matches.add('aten::' + match[6:])
      #     if match.startswith('ops.') and len(match.split('.')) > 2:
      #         matches.add(match[4:].replace('.', '::'))
      # for schema in schemas.values():
      #     for match in matches:
      #         if schema.name.startswith(match):
      #             filtered_schemas.add(schema.name)
      return dict(
          filter(lambda _: _[0] in filtered_schemas, schemas.items())
      )
  
file_path: netron/tools/pytorch_metadata.py
imports: import collections
  import json
  import os
  import re
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: _filter_schemas(schemas, types) and returns: dict