code: def _count_class_sample(y) -> Dict[Any, int]:
      unique, counts = np.unique(y, return_counts=True)
      return dict(zip(unique, counts))
  
imports: import warnings
  from collections import OrderedDict
  from functools import wraps
  from inspect import Parameter, signature
  from numbers import Real
  from typing import Any, Dict
  import numpy
  from sklearn.utils import column_or_1d
  from sklearn.utils.multiclass import type_of_target
label_desc: Use image node_id 1 for calling a global function with example usage: _count_class_sample(y) and returns: dict