class_docstr: Test the IciL1bNCFileHandler reader.
class_docstr_tok: ["Test","the","IciL1bNCFileHandler","reader","."]
docstr: Test filter variable.
docstr_tok: ["Test","filter","variable","."]
code: def test_filter_variable(self, reader, dims, data_info, expect):
      """Test filter variable."""
      data = np.arange(24).reshape(2, 3, 4)
      variable = xr.DataArray(
          np.arange(24).reshape(2, 3, 4),
          dims=dims,
      )
      filtered = reader._filter_variable(variable, data_info)
      assert filtered.dims == ("y", "x")
      assert (filtered == data[:, :, expect]).all()
  
imports: from datetime import datetime
  from unittest.mock import patch
  import numpy
  import pytest
  import xarray
  from netCDF4 import Dataset
  from satpy.readers.ici_l1b_nc import IciL1bNCFileHandler, InterpolationType
label_desc: Use image node_id 15 for calling the TestIciL1bNCFileHandler obj's underlying member method code with example usage: obj.test_filter_variable(reader, dims, data_info, expect) without return types