code: def get_logger(context=None, name=None):
      
      # Many class instances have their own logger. Share them to save memory if
      # possible, i.e. when *context* is not set.
      if name is None:
          name = _logger_name
      if context is None and name in _logger_dict:
          return _logger_dict[name]
      if context is not None and not isinstance(context, six.string_types):
          context = util.objref(context)
      logger = logging.getLogger(name)
      logger = ContextLogger(logger, context)
      if context is None:
          _logger_dict[name] = logger
      return logger
docs: Return a logger for *context*.
  
      Return a :class:`ContextLogger` instance. The instance implements the
      standard library's :class:`logging.Logger` interface.