def const_factory(value):
 assert (not isinstance(value, NodeNG))
 try:
  return CONST_CLS[value.__class__](value)
 except (KeyError, AttributeError):
  node = EmptyNode()
  node.object = value
  return node

def const_factory ( value ) : assert ( not isinstance ( value , NodeNG ) ) try : return CONST_CLS [ value . __class__ ] ( value ) except ( KeyError , AttributeError ) : node = EmptyNode ( ) node . object = value return node
return an astroid node for a python value .