code: def from_config(spec, **kwargs):
      """Create a datasource from a config specification."""
      spec = dict(spec)
      ds_type = spec.pop("type")
      if ds_type == "nerfies":
          return NerfiesDataSource(**spec, **kwargs)
  
      raise ValueError(f"Unknown datasource type {ds_type!r}")
  
label_desc: Use image node_id 1 for calling a global function with example usage: from_config(spec) and returns: NerfiesDataSource