code: def instantiate_interface(virtual_iface, config, loop):
      
  
      # Allow the null virtual interface for testing
      if virtual_iface == 'null':
          return StandardDeviceServer(None, {}, loop=loop)
  
      conf = {}
      if 'interface' in config:
          conf = config['interface']
  
      try:
          reg = ComponentRegistry()
          if virtual_iface.endswith('.py'):
              _name, iface = reg.load_extension(virtual_iface, class_filter=AbstractDeviceServer, unique=True)
          else:
              _name, iface = reg.load_extensions('iotile.device_server', name_filter=virtual_iface,
                                                 class_filter=AbstractDeviceServer, unique=True)
  
          return iface(None, conf, loop=loop)
      except ArgumentError as err:
          print("ERROR: Could not load device_server (%s): %s" % (virtual_iface, err.msg))
          sys.exit(1)
docs: Find a virtual interface by name and instantiate it
  
      Args:
          virtual_iface (string): The name of the pkg_resources entry point corresponding to
              the interface.  It should be in group iotile.virtual_interface
          config (dict): A dictionary with a 'interface' key with the config info for configuring
              this virtual interface.  This is optional.
  
      Returns:
          VirtualInterface: The instantiated subclass of VirtualInterface