code: def set_custom(self, key, value=None):
          
          # Split combined key/value
          if value is None:
              try:
                  key, value = key.split('=', 1)
              except (ValueError, TypeError) as exc:
                  raise error.UserError("Bad custom field assignment %r, probably missing a '=' (%s)" % (key, exc))
  
          # Check identifier rules
          if not key:
              raise error.UserError("Custom field name cannot be empty!")
          elif len(key) == 1 and key in "12345":
              method, args = "custom"+key+".set", (value,)
          elif not (key[0].isalpha() and key.replace("_", "").isalnum()):
              raise error.UserError("Bad custom field name %r (must only contain a-z, A-Z, 0-9 and _)" % (key,))
          else:
              method, args = "custom.set", (key, value)
  
          # Make the assignment
          self._make_it_so("setting custom_%s = %r on" % (key, value), [method], *args)
          self._fields["custom_"+key] = value
docs: Set a custom value. C{key} might have the form "key=value" when value is C{None}.