code: def _normalize_class_names(class_names, nclasses):
      if class_names is None:
          return {i: f"Class {i}" for i in range(nclasses)}
      if isinstance(class_names, dict):
          return class_names
      elif isinstance(class_names, Sequence):
          return {i: n for i, n in enumerate(class_names)}
      elif isinstance(class_names, ndarray):
          return list(class_names)
      else:
          raise Exception(
              f"class_names must be dict or sequence, not {class_names.__class__.__name__}"
          )
  
imports: import os
  import re
  import tempfile
  import warnings
  import xml.etree.cElementTree
  from pathlib import Path
  from sys import platform
  import graphviz
  import numpy
  import pandas
  from matplotlib import patches
  from numpy import ndarray
  from numbers import Number
  from typing import Tuple, Sequence
label_desc: Use image node_id 7 for calling a global function with example usage: _normalize_class_names(class_names, nclasses) and returns: unknown, class_names, unknown, list