code: def _as_in_context(data, ctx):
      
      if isinstance(data, nd.NDArray):
          return data.as_in_context(ctx)
      elif isinstance(data, (list, tuple)):
          return [_as_in_context(d, ctx) for d in data]
      return data
docs: Move data into new context.