def LoadFromStorage(path, product_yaml_key, required_client_values, optional_product_values):
 if (not os.path.isabs(path)):
  path = os.path.expanduser(path)
 try:
  with open(path, 'rb') as handle:
   yaml_doc = handle.read()
 except IOError:
  raise googleads.errors.GoogleAdsValueError(('Given yaml file, %s, could not be opened.' % path))
 try:
  client_kwargs = LoadFromString(yaml_doc, product_yaml_key, required_client_values, optional_product_values)
 except googleads.errors.GoogleAdsValueError as e:
  e.message = ('Given yaml file, %s, could not find some keys. %s' % (path, e.message))
  raise
 return client_kwargs

def LoadFromStorage ( path , product_yaml_key , required_client_values , optional_product_values ) : if ( not os . path . isabs ( path ) ) : path = os . path . expanduser ( path ) try : with open ( path , 'rb' ) as handle : yaml_doc = handle . read ( ) except IOError : raise googleads . errors . GoogleAdsValueError ( ( 'Given yaml file, %s, could not be opened.' % path ) ) try : client_kwargs = LoadFromString ( yaml_doc , product_yaml_key , required_client_values , optional_product_values ) except googleads . errors . GoogleAdsValueError as e : e . message = ( 'Given yaml file, %s, could not find some keys. %s' % ( path , e . message ) ) raise return client_kwargs
loads the data necessary for instantiating a client from file storage .