code: def get_states(self):
      self.states = self.ldict.get("states", None)
      # Build statemap
      if self.states:
          if not isinstance(self.states, (tuple, list)):
              self.log.error(
                  "states must be defined as a tuple or list"
              )
              self.error = True
          else:
              for s in self.states:
                  if not isinstance(s, tuple) or len(s) != 2:
                      self.log.error(
                          "Invalid state specifier %s. Must be a tuple (statename,'exclusive|inclusive')",
                          repr(s),
                      )
                      self.error = True
                      continue
                  name, statetype = s
                  if not isinstance(name, StringTypes):
                      self.log.error(
                          "State name %s must be a string", repr(name)
                      )
                      self.error = True
                      continue
                  if not (
                      statetype == "inclusive"
                      or statetype == "exclusive"
                  ):
                      self.log.error(
                          "State type for state %s must be 'inclusive' or 'exclusive'",
                          name,
                      )
                      self.error = True
                      continue
                  if name in self.stateinfo:
                      self.log.error("State '%s' already defined", name)
                      self.error = True
                      continue
                  self.stateinfo[name] = statetype
  
imports: import re
  import sys
  import types
  import copy
  import os
  import inspect
label_desc: Use image node_id 8 for calling the LexerReflect obj's underlying member method code with example usage: obj.get_states() without return types