code: def _keys2sls(self, keys, key2sl):
          
          sls = list()
          if isinstance(keys, tuple):
              for key in keys:
                  sls.append(key2sl(key))
          else:
              sls.append(key2sl(keys))
          if len(sls) > self.ndim:
              fstr = "expected <= {0.ndim} slice dimensions, got {1}"
              raise ValueError(fstr.format(self, len(sls)))
          return sls
docs: Convert an input key to a list of slices.