code: 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
  
file_path: image-super-resolution/ISR/utils/utils.py
imports: import os
  import argparse
  from datetime import datetime
  import numpy
  import yaml
  from ISR.utils.logger import get_logger
label_desc: Use image node_id 4 for calling a global function with example usage: check_parameter_keys(parameter, needed_keys, optional_keys, default_value) without return types