#NEWLINE# def LoadSingleClientDeployInfo( client_deploy_info ) : #NEWLINE# #INDENT# 'Returns a ClientDeployInfoExternal from a deploy_info.yaml file or string.\n\n  Args:\n    client_deploy_info: The contents of a client_deploy_info.yaml file or\n      string, or an open file object.\n\n  Returns:\n    A ClientDeployInfoExternal instance which represents the contents of the\n    parsed yaml.\n\n  Raises:\n    EmptyYaml: when there are no documents in yaml.\n    MultipleClientDeployInfo: when there are multiple documents in yaml.\n    yaml_errors.EventError: when an error occurs while parsing the yaml.\n  ' #NEWLINE# builder = yaml_object . ObjectBuilder ( ClientDeployInfoExternal ) #NEWLINE# handler = yaml_builder . BuilderHandler ( builder ) #NEWLINE# listener = yaml_listener . EventListener ( handler ) #NEWLINE# listener . Parse ( client_deploy_info ) #NEWLINE# parsed_yaml = handler . GetResults ( ) #NEWLINE# if ( not parsed_yaml ) : #NEWLINE# #INDENT# raise EmptyYaml ( ) #NEWLINE# #UNINDENT# if ( len ( parsed_yaml ) > 1 ) : #NEWLINE# #INDENT# raise MultipleClientDeployInfo ( ) #NEWLINE# #UNINDENT# return parsed_yaml [ 0 ]