def read_types(infile):
 with open(infile, 'r') as stream:
  return yaml.safe_load(stream)

def read_types ( infile ) : with open ( infile , 'r' ) as stream : return yaml . safe_load ( stream )
reads types definitions from a file .