code: def mars_dask_get(dsk: dict, keys: Union[List[List[str]], List[str]]):
      """
      A Dask-Mars convert function. This function will send the dask graph layers
          to Mars Remote API, generating mars objects correspond to the provided keys.
  
      Parameters
      ----------
      dsk: Dict
          Dask graph, represented as a task DAG dictionary.
      keys: Union[List[List[str]], List[str]]
          1d or 2d list of Dask graph keys whose values we wish to compute and return.
  
      Returns
      -------
      Object
          Spawned mars objects corresponding to the provided keys with same dimension.
      """
  
      def _get_arg(a):
          # if arg contains layer index or callable objs, handle it
          if ishashable(a) and a in dsk.keys():
              while ishashable(a) and a in dsk.keys():
                  a = dsk[a]
              return _spawn_task(a)
          elif not isinstance(a, str) and hasattr(a, "__getitem__"):
              if istask(
                  a
              ):  # TODO:Handle `SubgraphCallable`, which may contains dsk in it
                  return spawn(
                      a[0], args=tuple(_get_arg(i) for i in a[1:])
                  )
              elif isinstance(a, dict):
                  return {k: _get_arg(v) for k, v in a.items()}
              elif isinstance(a, List) or isinstance(a, Tuple):
                  return type(a)(_get_arg(i) for i in a)
          return a
  
      def _spawn_task(task: tuple):
          if not istask(task):
              return _get_arg(task)
          return spawn(
              task[0], args=tuple(_get_arg(a) for a in task[1:])
          )
  
      return [
          [_spawn_task(dsk[k]) for k in keys_d]
          if isinstance(keys_d, List)
          else _spawn_task(dsk[keys_d])
          for keys_d in keys
      ]
  
imports: from typing import List, Tuple, Union
  from dask.core import istask, ishashable
  from ...remote import spawn
  from ...session import execute
  from .utils import reduce
label_desc: Use image node_id 2 for calling a global function with example usage: mars_dask_get(dsk, keys) and returns: unknown, a, spawn, _spawn_task, _get_arg, spawn, unknown, type