class_docstr: Test how metadata is combined.
class_docstr_tok: ["Test","how","metadata","is","combined","."]
docstr: Test the average_datetimes helper function.
docstr_tok: ["Test","the","average_datetimes","helper","function","."]
code: def test_average_datetimes(self):
      """Test the average_datetimes helper function."""
      from satpy.dataset.metadata import average_datetimes
  
      dts = (
          datetime(2018, 2, 1, 11, 58, 0),
          datetime(2018, 2, 1, 11, 59, 0),
          datetime(2018, 2, 1, 12, 0, 0),
          datetime(2018, 2, 1, 12, 1, 0),
          datetime(2018, 2, 1, 12, 2, 0),
      )
      ret = average_datetimes(dts)
      assert dts[2] == ret
  
imports: import unittest
  from datetime import datetime
  import numpy
  import pytest
  from satpy.dataset.dataid import DataID, DataQuery, ModifierTuple, WavelengthRange, minimal_default_keys_config
  from satpy.readers.pmw_channels_definitions import FrequencyDoubleSideBand, FrequencyQuadrupleSideBand, FrequencyRange
  from satpy.tests.utils import make_cid, make_dataid, make_dsq
label_desc: Use image node_id 2 for calling the TestCombineMetadata obj's underlying member method code with example usage: obj.test_average_datetimes() without return types