code: def GetItemContainerInfo(self_link, alt_content_path, id_from_response):
       
  
      self_link = TrimBeginningAndEndingSlashes(self_link) + '/'
  
      index = IndexOfNth(self_link, '/', 4)
  
      if index != -1:
          collection_id = self_link[0:index]
  
          if 'colls' in self_link:
              # this is a collection request
              index_second_slash = IndexOfNth(alt_content_path, '/', 2)
              if index_second_slash == -1:
                  collection_name = alt_content_path + '/colls/' + urllib_quote(id_from_response)
                  return collection_id, collection_name
              else:
                  collection_name = alt_content_path
                  return collection_id, collection_name
          else:
              raise ValueError('Response Not from Server Partition, self_link: {0}, alt_content_path: {1}, id: {2}'
                  .format(self_link, alt_content_path, id_from_response))
      else:
          raise ValueError('Unable to parse document collection link from ' + self_link)
docs: Given the self link and alt_content_path from the reponse header and result
          extract the collection name and collection id
  
          Ever response header has alt-content-path that is the 
          owner's path in ascii. For document create / update requests, this can be used
          to get the collection name, but for collection create response, we can't use it.
          So we also rely on  
  
      :param str self_link:
          Self link of the resource, as obtained from response result.
      :param str alt_content_path:
          Owner path of the resource, as obtained from response header.
      :param str resource_id:
          'id' as returned from the response result. This is only used if it is deduced that the
           request was to create a collection.
  
      :return:
          tuple of (collection rid, collection name)
      :rtype: tuple