def gafiterator(handle):
 inline = handle.readline()
 if (inline.strip() == '!gaf-version: 2.0'):
  return _gaf20iterator(handle)
 elif (inline.strip() == '!gaf-version: 2.1'):
  return _gaf20iterator(handle)
 elif (inline.strip() == '!gaf-version: 1.0'):
  return _gaf10iterator(handle)
 else:
  raise ValueError('Unknown GAF version {0}\n'.format(inline))

def gafiterator ( handle ) : inline = handle . readline ( ) if ( inline . strip ( ) == '!gaf-version: 2.0' ) : return _gaf20iterator ( handle ) elif ( inline . strip ( ) == '!gaf-version: 2.1' ) : return _gaf20iterator ( handle ) elif ( inline . strip ( ) == '!gaf-version: 1.0' ) : return _gaf10iterator ( handle ) else : raise ValueError ( 'Unknown GAF version {0}\n' . format ( inline ) )
iterate over a gaf 1 .