class_docstr: Test the SAFE XML Noise file handler.
class_docstr_tok: ["Test","the","SAFE","XML","Noise","file","handler","."]
docstr: Set up the test case.
docstr_tok: ["Set","up","the","test","case","."]
code: def setUp(self):
      """Set up the test case."""
      filename_info = dict(
          start_time=None, end_time=None, polarization="vv"
      )
      self.annotation_fh = SAFEXMLAnnotation(
          BytesIO(annotation_xml), filename_info, mock.MagicMock()
      )
      self.noise_fh = SAFEXMLNoise(
          BytesIO(noise_xml),
          filename_info,
          mock.MagicMock(),
          self.annotation_fh,
      )
  
      self.expected_azimuth_noise = np.array(
          [
              [
                  np.nan,
                  1,
                  1,
                  1,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
              ],
              [
                  np.nan,
                  1,
                  1,
                  1,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
              ],
              [2, 2, 3, 3, 3, 4, 4, 4, 4, np.nan],
              [2, 2, 3, 3, 3, 4, 4, 4, 4, np.nan],
              [2, 2, 3, 3, 3, 4, 4, 4, 4, np.nan],
              [2, 2, 5, 5, 5, 5, 6, 6, 6, 6],
              [2, 2, 5, 5, 5, 5, 6, 6, 6, 6],
              [2, 2, 5, 5, 5, 5, 6, 6, 6, 6],
              [2, 2, 7, 7, 7, 7, 7, 8, 8, 8],
              [2, 2, 7, 7, 7, 7, 7, 8, 8, 8],
          ]
      )
  
      self.expected_range_noise = np.array(
          [
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
              [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
          ]
      )
  
      self.noise_fh_with_holes = SAFEXMLNoise(
          BytesIO(noise_xml_with_holes),
          filename_info,
          mock.MagicMock(),
          self.annotation_fh,
      )
      self.expected_azimuth_noise_with_holes = np.array(
          [
              [
                  np.nan,
                  np.nan,
                  np.nan,
                  1,
                  1,
                  1,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
              ],
              [2, 2, np.nan, 1, 1, 1, np.nan, np.nan, np.nan, np.nan],
              [2, 2, np.nan, 1, 1, 1, np.nan, np.nan, 3, 3],
              [2, 2, 4, 4, 5, 5, np.nan, np.nan, 3, 3],
              [2, 2, 4, 4, 5, 5, 6, 6, 3, 3],
              [2, 2, 4, 4, 7, 7, 7, 8, 8, 8],
              [9, 9, 9, 9, 7, 7, 7, 8, 8, 8],
              [9, 9, 9, 9, 7, 7, 7, 8, 8, 8],
              [
                  10,
                  np.nan,
                  11,
                  11,
                  12,
                  12,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
              ],
              [
                  10,
                  np.nan,
                  11,
                  11,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
                  np.nan,
              ],
          ]
      )
  
imports: import unittest
  import unittest.mock
  from enum import Enum
  from io import BytesIO
  import dask.array
  import numpy
  import xarray
  from satpy.dataset import DataQuery
  from satpy.readers.sar_c_safe import SAFEXMLAnnotation, SAFEXMLCalibration, SAFEXMLNoise
label_desc: Use image node_id 1 for calling the TestSAFEXMLNoise obj's underlying member method code with example usage: obj.setUp() without return types