code: def lookup_extra_networks(extra_network_data):
      """returns a dict mapping ExtraNetwork objects to lists of arguments for those extra networks.
  
      Example input:
      {
          'lora': [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58310>],
          'lyco': [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58F70>],
          'hypernet': [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D5A800>]
      }
  
      Example output:
  
      {
          <extra_networks_lora.ExtraNetworkLora object at 0x0000020581BEECE0>: [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58310>, <modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58F70>],
          <modules.extra_networks_hypernet.ExtraNetworkHypernet object at 0x0000020581BEEE60>: [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D5A800>]
      }
      """
  
      res = {}
  
      for extra_network_name, extra_network_args in list(
          extra_network_data.items()
      ):
          extra_network = extra_network_registry.get(
              extra_network_name, None
          )
          alias = extra_network_aliases.get(extra_network_name, None)
  
          if alias is not None and extra_network is None:
              extra_network = alias
  
          if extra_network is None:
              logging.info(
                  f"Skipping unknown extra network: {extra_network_name}"
              )
              continue
  
          res.setdefault(extra_network, []).extend(extra_network_args)
  
      return res
  
imports: import json
  import os
  import re
  import logging
  from collections import defaultdict
  from modules import errors
label_desc: Use image node_id 5 for calling a global function with example usage: lookup_extra_networks(extra_network_data) and returns: res