class_docstr: 可用于监控某个数值，并通过 :meth:`is_better_results` 等接口检测结果是否变得更好。
  
  :param monitor: 监控的 metric 值：
  
      * 为 ``None``
       将尝试使用 :class:`~fastNLP.core.controllers.Trainer` 中设置 `monitor` 值（如果有设置）；
      * 为 ``str``
       尝试直接使用该名称从 ``evaluation`` 结果中寻找，如果在 ``evaluation`` 结果中没有找到完全一致的名称，将
       使用 最长公共字符串算法 从 ``evaluation`` 结果中找到最匹配的那个作为 ``monitor`` ；
      * 为 :class:`Callable`
       接受参数为 ``evaluation`` 的结果(字典类型)，返回一个 ``float`` 值作为 ``monitor`` 的结果，如果当前结果中没有相关
       的 ``monitor`` 值请返回 ``None`` ；
  :param larger_better: monitor 是否为越大越好；
docstr: 检测 ``monitor_value`` 是否是更好的
  
  :param monitor_value: 待检查的 ``monitor_value`` 。如果为 ``None`` ，返回 False；
  :param keep_if_better: 如果传入的 ``monitor_value`` 值更好，则将其保存下来；
  :return:
docstr_tok: ["\u68c0\u6d4b","``","monitor_value","``","\u662f\u5426\u662f\u66f4\u597d\u7684",":","param","monitor_value",":","\u5f85\u68c0\u67e5\u7684","``","monitor_value","``","\u3002\u5982\u679c\u4e3a","``","None","``","\uff0c\u8fd4\u56de","False\uff1b",":","param","keep_if_better",":","\u5982\u679c\u4f20\u5165\u7684","``","monitor_value","``","\u503c\u66f4\u597d\uff0c\u5219\u5c06\u5176\u4fdd\u5b58\u4e0b\u6765\uff1b",":","return",":"]
code: def is_better_monitor_value(
      self, monitor_value: float, keep_if_better=True
  ):
      """
      检测 ``monitor_value`` 是否是更好的
  
      :param monitor_value: 待检查的 ``monitor_value`` 。如果为 ``None`` ，返回 False；
      :param keep_if_better: 如果传入的 ``monitor_value`` 值更好，则将其保存下来；
      :return:
      """
      if monitor_value is None:
          return False
      better = self.is_former_monitor_value_better(
          monitor_value, self.monitor_value
      )
      if keep_if_better and better:
          self.monitor_value = monitor_value
      return better
  
imports: from typing import Dict, Union, Any
  from abc import ABC
  import functools
  from fastNLP.core.utils import apply_to_collection
  from fastNLP.core.callbacks import Callback
  from fastNLP.core.callbacks.utils import _get_monitor_value
  from fastNLP.core.log import logger
  from fastNLP.core.utils.utils import _check_valid_parameters_number
label_desc: Use image node_id 5 for calling the ResultsMonitor obj's underlying member method code with example usage: obj.is_better_monitor_value(monitor_value, keep_if_better) and returns: better, False