code: def set_2dgrid(hist, keys):
      """Set 2d grid of first two dimensions of input histogram
  
      Used as input by get_2dgrid(hist).
  
      :param hist: input histogrammar histogram
      :param list xkeys: list with unique x keys
      :param list ykeys: list with unique y keys
      :return: filled 2d numpy grid
      """
      return set_ndgrid(hist, keys, n_dim=2)
  
imports: from __future__ import annotations
  import warnings
  import histogrammar
  import numpy
  from histogrammar.util import get_hist_props
  from popmon.hist.hist_utils import get_bin_centers, is_numeric
  from popmon.stats.numpy import quantile
label_desc: Use image node_id 4 for calling a global function with example usage: set_2dgrid(hist, keys) and returns: set_ndgrid