code: def get_style_code(self, label):
          
  
          for style in self.styles:
              if style[0] == label:
                  return style[1]
  
          msg = _("Label {label} is invalid.").format(label=label)
          raise ValueError(msg)
docs: Returns code for given label string
  
          Inverse of get_code
  
          Parameters
          ----------
          label: String
          \tLlabel string, field 0 of style tuple