class_docstr: Abstract base class representing a fail-safe control on the behavior of any
  algorithm.
class_docstr_tok: ["Abstract","base","class","representing","a","fail-safe","control","on","the","behavior","of","any","algorithm","."]
code: def _constraint_msg(self, metadata):
      constraint = repr(self)
      if metadata:
          constraint = "{constraint} (Metadata: {metadata})".format(
              constraint=constraint, metadata=metadata
          )
      return constraint
  
imports: import abc
  import logbook
  import pandas
  from six import with_metaclass
  from catalyst.errors import AccountControlViolation, TradingControlViolation
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 3 for calling the TradingControl obj's underlying member method code with example usage: obj._constraint_msg(metadata) and returns: constraint