def METHOD_NAME(data: te.Tensor, repeats: IntImm, axis: Optional[IntImm]):
    if axis is None:
        # flatten data
        out_shape = data.shape[0]
        for i in data.shape[1:]:
            out_shape *= i
        data = topi.reshape(data, (out_shape,))
        axis = 0
    # topi only receives int repeats and axis
    return topi.repeat(data, int(repeats), int(axis))