code: def create_imagelab(
      dataset: "Dataset", image_key: Optional[str]
  ) -> Optional["Imagelab"]:
      """Creates Imagelab instance for running CleanVision checks. CleanVision checks are only supported for
      huggingface datasets as of now.
  
      Parameters
      ----------
      dataset: datasets.Dataset
          Huggingface dataset used by Imagelab
      image_key: str
          key for image feature in the huggingface dataset
  
      Returns
      -------
      Imagelab
      """
      imagelab = None
      if not image_key:
          return imagelab
      try:
          from cleanvision import Imagelab
          from datasets.arrow_dataset import Dataset
  
          if isinstance(dataset, Dataset):
              imagelab = Imagelab(
                  hf_dataset=dataset, image_key=image_key
              )
          else:
              raise ValueError(
                  "For now, only huggingface datasets are supported for running cleanvision checks inside cleanlab. You can easily convert most datasets to the huggingface dataset format."
              )
  
      except ImportError:
          raise ImportError(
              "Cannot import required image packages. Please install them via: `pip install cleanlab[image]` or just install cleanlab with "
              "all optional dependencies via: `pip install cleanlab[all]`"
          )
      return imagelab
  
imports: import warnings
  from typing import TYPE_CHECKING, Any, Dict, List, Optional
  import numpy
  import numpy.typing
  import pandas
  from scipy.sparse import csr_matrix
  from cleanlab.datalab.internal.adapter.constants import DEFAULT_CLEANVISION_ISSUES, IMAGELAB_ISSUES_MAX_PREVALENCE
  from cleanlab.datalab.internal.data import Data
  from cleanlab.datalab.internal.data_issues import DataIssues, _InfoStrategy
  from cleanlab.datalab.internal.issue_finder import IssueFinder
  from cleanlab.datalab.internal.report import Reporter
label_desc: Use image node_id 1 for calling a global function with example usage: create_imagelab(dataset, image_key) and returns: imagelab, imagelab