code: def test_check_parameter_keys(self):
      par = {"a": 0}
      utils.check_parameter_keys(parameter=par, needed_keys=["a"])
      utils.check_parameter_keys(
          parameter=par,
          needed_keys=None,
          optional_keys=["b"],
          default_value=-1,
      )
      self.assertTrue(par["b"] == -1)
      try:
          utils.check_parameter_keys(parameter=par, needed_keys=["c"])
      except:
          self.assertTrue(True)
      else:
          self.assertTrue(False)
  
      def check_parameter_keys(
          parameter, needed_keys, optional_keys=None, default_value=None
      ):
          if needed_keys:
              for key in needed_keys:
                  if key not in parameter:
                      logger.error(
                          "{p} is missing key {k}".format(
                              p=parameter, k=key
                          )
                      )
                      raise
          if optional_keys:
              for key in optional_keys:
                  if key not in parameter:
                      logger.info(
                          "Setting {k} in {p} to {d}".format(
                              k=key, p=parameter, d=default_value
                          )
                      )
                      parameter[key] = default_value
  
imports: import logging
  import os
  import unittest
  import yaml
  from unittest.mock import patch
  from ISR.utils import utils
label_desc: Use image node_id 5 for calling the UtilsClassTest obj's underlying member method code with example usage: obj.test_check_parameter_keys() without return types