def METHOD_NAME(self, shape, shape_center, shape_width, shape_height, shift0, shift1, tile):
    graph = nx.Graph()
    shape_diagonal = Point(shape_width, shape_height).length()
    num_tiles = ceil(shape_diagonal / min(shift0.length(), shift1.length()))
    debug.log(f"num_tiles: {num_tiles}")
    tile_diagonal = (shift0 + shift1).length()
    x_cutoff = shape_width / 2 + tile_diagonal
    y_cutoff = shape_height / 2 + tile_diagonal
    for repeat0 in range(-num_tiles, num_tiles):
        for repeat1 in range(-num_tiles, num_tiles):
            check_stop_flag()
            offset0 = repeat0 * shift0
            offset1 = repeat1 * shift1
            offset = offset0 + offset1
            if abs(offset.x) > x_cutoff or abs(offset.y) > y_cutoff:
                continue
            this_tile = self._translate_tile(tile, offset + shape_center)
            for line in this_tile:
                line_string = LineString(line)
                if shape.contains(line_string):
                    graph.add_edge(line[0], line[1])
    self._remove_dead_ends(graph)
    return graph