Converts logging_level into TensorFlow logging verbosity value

  Args:
    logging_level: String value representing logging level: 'DEBUG', 'INFO',
    'WARN', 'ERROR', 'FATAL'

def logging_level_verbosity(logging_verbosity):
  """Converts logging_level into TensorFlow logging verbosity value

  Args:
    logging_level: String value representing logging level: 'DEBUG', 'INFO',
    'WARN', 'ERROR', 'FATAL'
  """
  name_to_level = {
    'FATAL': tf.logging.FATAL,
    'ERROR': tf.logging.ERROR,
    'WARN': tf.logging.WARN,
    'INFO': tf.logging.INFO,
    'DEBUG': tf.logging.DEBUG
  }

  try:
    return name_to_level[logging_verbosity]
  except Exception as e:
    raise RuntimeError('Not supported logs verbosity (%s). Use one of %s.' %
                       (str(e), list(name_to_level)))