code: def create(**kwargs) -> "DocumentArray":
      from .config import load_config
      from .runner import do_run
  
      if "init_document" in kwargs:
          d = kwargs["init_document"]
          _kwargs = d.tags
          if not _kwargs:
              warnings.warn(
                  "init_document has no .tags, fallback to default config"
              )
          if d.uri:
              _kwargs["init_image"] = kwargs["init_document"].uri
          else:
              warnings.warn(
                  "init_document has no .uri, fallback to no init image"
              )
          kwargs.pop("init_document")
          if kwargs:
              warnings.warn(
                  "init_document has .tags and .uri, but kwargs are also present, will override .tags"
              )
              _kwargs.update(kwargs)
          _args = load_config(user_config=_kwargs)
      else:
          _args = load_config(user_config=kwargs)
  
      model, diffusion = load_diffusion_model(
          model_config, _args.diffusion_model, steps=_args.steps
      )
  
      clip_models = load_clip_models(
          enabled=_args.clip_models, clip_models=_clip_models_cache
      )
  
      gc.collect()
      paddle.device.cuda.empty_cache()
      try:
          return do_run(
              _args, (model, diffusion, clip_models, secondary_model)
          )
      except KeyboardInterrupt:
          pass
  
file_path: PaddleHub/modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/__init__.py
imports: import os
  import warnings
  import sys
  import gc
  import paddle
  from .helper import load_all_models, load_diffusion_model, load_clip_models
  from typing import TYPE_CHECKING, overload, List, Optional
label_desc: Use image node_id 3 for calling a global function with example usage: create() and returns: do_run