def solc_parse_output(compiler_output):
 result = yaml.safe_load(compiler_output)['contracts']
 if ('bin' in tuple(result.values())[0]):
  for value in result.values():
   value['bin_hex'] = value['bin']
   try:
    value['bin'] = decode_hex(value['bin_hex'])
   except TypeError:
    pass
 for json_data in ('abi', 'devdoc', 'userdoc'):
  if (json_data not in tuple(result.values())[0]):
   continue
  for value in result.values():
   value[json_data] = yaml.safe_load(value[json_data])
 return result

def solc_parse_output ( compiler_output ) : result = yaml . safe_load ( compiler_output ) [ 'contracts' ] if ( 'bin' in tuple ( result . values ( ) ) [ 0 ] ) : for value in result . values ( ) : value [ 'bin_hex' ] = value [ 'bin' ] try : value [ 'bin' ] = decode_hex ( value [ 'bin_hex' ] ) except TypeError : pass for json_data in ( 'abi' , 'devdoc' , 'userdoc' ) : if ( json_data not in tuple ( result . values ( ) ) [ 0 ] ) : continue for value in result . values ( ) : value [ json_data ] = yaml . safe_load ( value [ json_data ] ) return result
parses the compiler output .