code: def _validate_config(config):
      
      required_keys = [KEY_ADDRESS, KEY_MODEL, KEY_PORT, KEY_PATHS]
      for key in required_keys:
          if key not in config:
              raise Error("Required key %s missing from config %s",
                          (key, config))
docs: Verifies that a config dict for an attenuator device is valid.
  
      Args:
          config: A dict that is the configuration for an attenuator device.
  
      Raises:
          attenuator.Error: A config is not valid.