code: def test_dataid():
      """Test the DataID object."""
      from satpy.dataset.dataid import (
          DataID,
          ModifierTuple,
          ValueList,
          WavelengthRange,
      )
  
      # Check that enum is translated to type.
      did = make_dataid()
      assert issubclass(did._id_keys["calibration"]["type"], ValueList)
      assert "enum" not in did._id_keys["calibration"]
  
      # Check that None is never a valid value
      did = make_dataid(name="cheese_shops", resolution=None)
      assert "resolution" not in did
      assert "None" not in did.__repr__()
      with pytest.raises(
          ValueError, match="Required field name missing."
      ):
          make_dataid(name=None, resolution=1000)
  
      # Check that defaults are applied correctly
      assert did["modifiers"] == ModifierTuple()
  
      # Check that from_dict creates a distinct instance...
      did2 = did.from_dict(dict(name="cheese_shops", resolution=None))
      assert did is not did2
      # ...But is equal
      assert did2 == did
  
      # Check that the instance is immutable
      with pytest.raises(TypeError):
          did["resolution"] = 1000
  
      # Check that a missing required field crashes
      with pytest.raises(
          ValueError, match="Required field name missing."
      ):
          make_dataid(resolution=1000)
  
      # Check to_dict
      assert did.to_dict() == dict(
          name="cheese_shops", modifiers=tuple()
      )
  
      # Check repr
      did = make_dataid(name="VIS008", resolution=111)
      assert (
          repr(did)
          == "DataID(name='VIS008', resolution=111, modifiers=())"
      )
  
      # Check inequality
      default_id_keys_config = {
          "name": None,
          "wavelength": {
              "type": WavelengthRange,
          },
          "resolution": None,
          "calibration": {
              "enum": [
                  "reflectance",
                  "brightness_temperature",
                  "radiance",
                  "counts",
              ]
          },
          "modifiers": {
              "default": ModifierTuple(),
              "type": ModifierTuple,
          },
      }
      assert DataID(default_id_keys_config, wavelength=10) != DataID(
          default_id_keys_config, name="VIS006"
      )
  
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 3 for calling a global function with example usage: test_dataid() without return types