code: def _GetContainingRange(self, partition_key):
          
          for keyrange in self.partition_map.keys():
              if keyrange.Contains(partition_key):
                  return keyrange
  
          return None
docs: Gets the containing range based on the partition key.