tools/metrics/structured/model_util.py
def error(elem, msg):
  """Raise a nicely formatted error with some context."""
  name = elem.attrib.get('name', None)
  name = name + ' ' if name else ''
  msg = 'Structured metrics error, {} node {}: {}.'.format(elem.tag, name, msg)
  raise ValueError(msg)
Raise a nicely formatted error with some context.
Raise a nicely formatted error with some context.
Raise a nicely formatted error with some context .
def error(elem, msg):
  name = elem.attrib.get('name', None)
  name = name + ' ' if name else ''
  msg = 'Structured metrics error, {} node {}: {}.'.format(elem.tag, name, msg)
  raise ValueError(msg)
def error ( elem , msg ) : name = elem . attrib . get ( 'name' , None ) name = name + ' ' if name else '' msg = 'Structured metrics error, {} node {}: {}.' . format ( elem . tag , name , msg ) raise ValueError ( msg )
Raise a nicely formatted error with some context.
Raise a nicely formatted error with some context .
"""Raise a nicely formatted error with some context."""
elem
msg