code: def encode_mx_context(v: mx.Context) -> Any:
      """
      Specializes :func:`encode` for invocations where ``v`` is an instance of
      the :class:`~mxnet.Context` class.
      """
      return {
          "__kind__": Kind.Instance,
          "class": fqname_for(v.__class__),
          "args": encode([v.device_type, v.device_id]),
      }
  
imports: from typing import Any
  import mxnet
  from gluonts.core import fqname_for
  from gluonts.core.serde import Kind, encode
label_desc: Use image node_id 1 for calling a global function with example usage: encode_mx_context(v) and returns: dict