def METHOD_NAME(h, w, obj_shape):
    if obj_shape == "octagon":
        smallest_side = min(h, w)
        pi = math.pi
        h_init = 0
        w_init = smallest_side / 2 * math.sin(pi / 2) / math.sin(3 * pi / 8)
        rads = np.linspace(0, -2 * pi, 8, endpoint=False) + 5 * pi / 8
        h_coords = [h_init * math.cos(r) - w_init * math.sin(r) + h / 2 for r in rads]
        w_coords = [h_init * math.sin(r) + w_init * math.cos(r) + w / 2 for r in rads]
        coords = [
            (int(round(wc)), int(round(hc))) for hc, wc in zip(h_coords, w_coords)
        ]
    elif obj_shape == "diamond":
        if h <= w:
            coords = np.array(
                [
                    [w // 2, 0],
                    [min(w - 1, int(round(w / 2 + h / 2))), h // 2],
                    [w // 2, h - 1],
                    [max(0, int(round(w / 2 - h / 2))), h // 2],
                ]
            )
        else:
            coords = np.array(
                [
                    [w // 2, max(0, int(round(h / 2 - w / 2)))],
                    [w - 1, h // 2],
                    [w // 2, min(h - 1, int(round(h / 2 + w / 2)))],
                    [0, h // 2],
                ]
            )
    elif obj_shape == "rect":
        # 0.8 w/h aspect ratio
        if h > w:
            coords = np.array(
                [
                    [max(0, int(round(w / 2 - 0.4 * h))), 0],
                    [min(w - 1, int(round(w / 2 + 0.4 * h))), 0],
                    [min(w - 1, int(round(w / 2 + 0.4 * h))), h - 1],
                    [max(0, int(round(w / 2 - 0.4 * h))), h - 1],
                ]
            )
        else:
            coords = np.array(
                [
                    [0, max(0, int(round(h / 2 - w / 1.6)))],
                    [w - 1, max(0, int(round(h / 2 - w / 1.6)))],
                    [w - 1, min(h - 1, int(round(h / 2 + w / 1.6)))],
                    [0, min(h - 1, int(round(h / 2 + w / 1.6)))],
                ]
            )
    else:
        raise ValueError('obj_shape can only be {"rect", "diamond", "octagon"}')
    return np.array(coords)