code: def get_logger(name, level=None):
      """Get a logger instance for the specified name.
  
      Args:
          name (str): Name for logger object being created
          level (str='INFO'): Initial log level for logger object being created
  
      Returns:
          logging.Logger: Instance of logging.Logger with the specified name
  
      """
      if not level:
          level = os.environ.get("LOGGER_LEVEL", "INFO")
  
      logger = logging.getLogger(name)
  
      set_formatter(logger)
  
      try:
          logger.setLevel(level.upper())
      except (TypeError, ValueError) as err:
          logger.setLevel("INFO")
          logger.error("Defaulting to INFO logging: %s", str(err))
  
      return logger
  
imports: import logging
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: get_logger(name, level) and returns: logger