code: def find_pipeline_class(loaded_module):
      """
      Retrieve pipeline class that inherits from `DiffusionPipeline`. Note that there has to be exactly one class
      inheriting from `DiffusionPipeline`.
      """
      from ..pipelines import DiffusionPipeline
  
      cls_members = dict(
          inspect.getmembers(loaded_module, inspect.isclass)
      )
  
      pipeline_class = None
      for cls_name, cls in cls_members.items():
          if (
              cls_name != DiffusionPipeline.__name__
              and issubclass(cls, DiffusionPipeline)
              and cls.__module__.split(".")[0] != "diffusers"
          ):
              if pipeline_class is not None:
                  raise ValueError(
                      f"Multiple classes that inherit from {DiffusionPipeline.__name__} have been found:"
                      f" {pipeline_class.__name__}, and {cls_name}. Please make sure to define only one in"
                      f" {loaded_module}."
                  )
              pipeline_class = cls
  
      return pipeline_class
  
imports: import importlib
  import inspect
  import json
  import os
  import re
  import shutil
  import sys
  from pathlib import Path
  from typing import Dict, Optional, Union
  from urllib import request
  from huggingface_hub import HfFolder, cached_download, hf_hub_download, model_info
  from packaging import version
  from ..None import __version__
  from .None import DIFFUSERS_DYNAMIC_MODULE_NAME, HF_MODULES_CACHE, logging
label_desc: Use image node_id 8 for calling a global function with example usage: find_pipeline_class(loaded_module) and returns: pipeline_class