def __init__(self, portrayal_method, grid_height, grid_width,
                 canvas_height=500, canvas_width=500):

        self.portrayal_method = portrayal_method
        self.grid_height = grid_height
        self.grid_width = grid_width
        self.canvas_height = canvas_height
        self.canvas_width = canvas_width

        new_element = ("new CanvasModule({}, {}, {}, {})"
            .format(self.canvas_width, self.canvas_height,
                self.grid_width, self.grid_height))

        self.js_code = "elements.push(" + new_element + ");"
Creates gRPC stub to make requests to the Cluster Admin API.
dataset/ETHPy150Open projectmesa/mesa/mesa/visualization/modules/CanvasGridVisualization.py/CanvasGrid.__init__--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/bigtable/client.py/Client._make_cluster_stub