class_docstr: Core ML version of
  `diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline`
class_docstr_tok: ["Core","ML","version","of","`","diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline","`"]
code: def run_safety_checker(self, image):
      if self.safety_checker is not None:
          safety_checker_input = self.feature_extractor(
              self.numpy_to_pil(image),
              return_tensors="np",
          )
  
          safety_checker_outputs = self.safety_checker(
              clip_input=safety_checker_input.pixel_values.astype(
                  np.float16
              ),
              images=image.astype(np.float16),
              adjustment=np.array([0.0]).astype(
                  np.float16
              ),  # defaults to 0 in original pipeline
          )
  
          # Unpack dict
          has_nsfw_concept = safety_checker_outputs["has_nsfw_concepts"]
          image = safety_checker_outputs["filtered_images"]
          concept_scores = safety_checker_outputs["concept_scores"]
  
          logger.info(
              f"Generated image has nsfw concept={has_nsfw_concept.any()}"
          )
      else:
          has_nsfw_concept = None
  
      return image, has_nsfw_concept
  
imports: import argparse
  from diffusers import StableDiffusionPipeline, StableDiffusionXLPipeline
  from diffusers.pipelines.pipeline_utils import DiffusionPipeline
  from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
  from diffusers.schedulers import DDIMScheduler, DPMSolverMultistepScheduler, EulerAncestralDiscreteScheduler, EulerDiscreteScheduler, LMSDiscreteScheduler, PNDMScheduler
  from diffusers.schedulers.scheduling_utils import SchedulerMixin
  import gc
  import inspect
  import logging
  import numpy
  import os
  from python_coreml_stable_diffusion.coreml_model import CoreMLModel, _load_mlpackage, _load_mlpackage_controlnet, get_available_compute_units
  import time
  import torch
  from transformers import CLIPFeatureExtractor, CLIPTokenizer
  from typing import List, Optional, Union, Tuple
  from PIL import Image
label_desc: Use image node_id 4 for calling the CoreMLStableDiffusionPipeline obj's underlying member method code with example usage: obj.run_safety_checker(image) and returns: image,  has_nsfw_concept