def METHOD_NAME(points: np.ndarray) -> np.ndarray:
    """
    Compute the centroid of polygons.
    :param array points: 3d array FRAMESxBODY-PARTxCOORDINATE
    :param str target: Options [perimeter, area]
    :return 1d np.array
    :example:
    >>> points = np.random.randint(1, 50, size=(50, 5, 2)).astype(float)
    >>> results = jitted_centroid(points)
    """
    results = np.full((points.shape[0], 2), np.nan)
    for i in range(points.shape[0]):
        S = points[i, :, :]
        a, b = np.argmin(S[:, 0]), np.argmax(S[:, 0])
        max_index = np.argmax(S[:, 0])
        idx = (
            process(S, np.arange(S.shape[0]), a, max_index)[:-1]
            + process(S, np.arange(S.shape[0]), max_index, a)[:-1]
        )
        perimeter_points = np.full((len(idx), 2), np.nan)
        for j in prange(len(idx)):
            perimeter_points[j] = points[i][j]
        results[i][0] = np.int(np.mean(perimeter_points[:, 0].flatten()))
        results[i][1] = np.int(np.mean(perimeter_points[:, 1].flatten()))
    return results