docs: def get_idims(self, arr, coords=None):
          """Get the coordinates in the :attr:`ds` dataset as int or slice
  
          This method returns a mapping from the coordinate names of the given
          `arr` to an integer, slice or an array of integer that represent the
          coordinates in the :attr:`ds` dataset and can be used to extract the
          given `arr` via the :meth:`xarray.Dataset.isel` method.
  
          Parameters
          ----------
          arr: xarray.DataArray
              The data array for which to get the dimensions as integers, slices
              or list of integers from the dataset in the :attr:`base` attribute
          coords: iterable
              The coordinates to use. If not given all coordinates in the
              ``arr.coords`` attribute are used
  
          Returns
          -------
          dict
              Mapping from coordinate name to integer, list of integer or slice
  
          See Also
          --------
          xarray.Dataset.isel, InteractiveArray.idims"""
          if coords is None:
              coords = arr.coords
          else:
              coords = {
                  label: coord for label, coord in six.iteritems(arr.coords)
                  if label in coords}
          ret = self.get_coord_idims(coords)
          # handle the coordinates that are not in the dataset
          missing = set(arr.dims).difference(ret)
          if missing:
              warn('Could not get slices for the following dimensions: %r' % (
                  missing, ), PsyPlotRuntimeWarning)
          return ret