code: def encode_np_ndarray(v: np.ndarray) -> Any:
      """
      Specializes :func:`encode` for invocations where ``v`` is an instance of
      the :class:`~numpy.ndarray` class.
      """
      return {
          "__kind__": Kind.Instance,
          "class": "numpy.array",  # use "array" ctor instead of "nparray" class
          "args": encode([v.tolist(), v.dtype]),
      }
  
imports: from typing import Any
  import numpy
  from ._base import Kind, encode
label_desc: Use image node_id 2 for calling a global function with example usage: encode_np_ndarray(v) and returns: dict