def _evaluate_for_annotation(evaluator, annotation, index=None):
 if (annotation is not None):
  definitions = evaluator.eval_element(_fix_forward_reference(evaluator, annotation))
  if (index is not None):
   definitions = list(itertools.chain.from_iterable((definition.py__getitem__(index) for definition in definitions if ((definition.type == 'tuple') and (len(list(definition.py__iter__())) >= index)))))
  return list(itertools.chain.from_iterable((evaluator.execute(d) for d in definitions)))
 else:
  return []

def _evaluate_for_annotation ( evaluator , annotation , index = None ) : if ( annotation is not None ) : definitions = evaluator . eval_element ( _fix_forward_reference ( evaluator , annotation ) ) if ( index is not None ) : definitions = list ( itertools . chain . from_iterable ( ( definition . py__getitem__ ( index ) for definition in definitions if ( ( definition . type == 'tuple' ) and ( len ( list ( definition . py__iter__ ( ) ) ) >= index ) ) ) ) ) return list ( itertools . chain . from_iterable ( ( evaluator . execute ( d ) for d in definitions ) ) ) else : return [ ]
evaluates a string-node .