code: def _create_factor_rule(tok):
          
          if tok[0] == 'IPV4':
              return IPV4Rule(tok[1])
          if tok[0] == 'IPV6':
              return IPV6Rule(tok[1])
          if tok[0] == 'DATETIME':
              return DatetimeRule(tok[1])
          if tok[0] == 'TIMEDELTA':
              return TimedeltaRule(tok[1])
          if tok[0] == 'INTEGER':
              return IntegerRule(tok[1])
          if tok[0] == 'FLOAT':
              return FloatRule(tok[1])
          if tok[0] == 'VARIABLE':
              return VariableRule(tok[1])
          return ConstantRule(tok[1])
docs: Simple helper method for creating factor node objects based on node name.