def make_resource_object(resource_type, credentials_path):
 try:
  (api_name, resource) = resource_type.split('.', 1)
 except ValueError:
  raise ValueError('resource_type "{0}" is not in form <api>.<resource>'.format(resource_type))
 version = determine_version(api_name)
 service = make_service(api_name, version, credentials_path)
 path = resource.split('.')
 node = service
 for elem in path:
  try:
   node = getattr(node, elem)()
  except AttributeError:
   path_str = '.'.join(path[0:path.index(elem)])
   raise AttributeError('"{0}{1}" has no attribute "{2}"'.format(api_name, (('.' + path_str) if path_str else ''), elem))
 return node

def make_resource_object ( resource_type , credentials_path ) : try : ( api_name , resource ) = resource_type . split ( '.' , 1 ) except ValueError : raise ValueError ( 'resource_type "{0}" is not in form <api>.<resource>' . format ( resource_type ) ) version = determine_version ( api_name ) service = make_service ( api_name , version , credentials_path ) path = resource . split ( '.' ) node = service for elem in path : try : node = getattr ( node , elem ) ( ) except AttributeError : path_str = '.' . join ( path [ 0 : path . index ( elem ) ] ) raise AttributeError ( '"{0}{1}" has no attribute "{2}"' . format ( api_name , ( ( '.' + path_str ) if path_str else '' ) , elem ) ) return node
creates and configures the service object for operating on resources .