code: def _set_value_from_string(self, val, existing_constants):
      # Set value
      val = val.strip(";")
      if val.startswith("0x"):
          value = int(val[2:].rstrip("ul"), 16)
      elif val[0] in "0123456789":
          value = int(val)
      elif val.startswith("'"):
          value = val
      elif val in existing_constants:
          value = existing_constants[val]
      else:
          print('Warning: Dont know what to do with "%s"' % val)
          value = None
      return value
  
imports: import os
label_desc: Use image node_id 3 for calling the ConstantDefinition obj's underlying member method code with example usage: obj._set_value_from_string(val, existing_constants) and returns: value