class_docstr: Test the SAFE MTD XML file handler.
class_docstr_tok: ["Test","the","SAFE","MTD","XML","file","handler","."]
docstr: Test the calibration with a different offset.
docstr_tok: ["Test","the","calibration","with","a","different","offset","."]
code: def test_xml_calibration_to_radiance(self):
      """Test the calibration with a different offset."""
      fake_data = xr.DataArray(
          [[[0, 1, 2, 3], [4, 1000, 65534, 65535]]],
          dims=["band", "x", "y"],
      )
      result = self.xml_fh.calibrate_to_radiances(fake_data, "B01")
      expected = np.array(
          [
              [
                  [np.nan, -251.584265, -251.332429, -251.080593],
                  [-250.828757, 0.0, 16251.99095, np.inf],
              ]
          ]
      )
      np.testing.assert_allclose(result, expected)
  
file_path: satpy/satpy/tests/reader_tests/test_msi_safe.py
imports: import unittest.mock
  from io import BytesIO, StringIO
  import numpy
  import pytest
  import xarray
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 7 for calling the TestMTDXML obj's underlying member method code with example usage: obj.test_xml_calibration_to_radiance() without return types