def METHOD_NAME(output_shape, condition):
    """Find the indices of elements of a 4-D tensor that are non-zero.
    Parameters
    ----------
    condition : tvm.te.Tensor
        4-D tensor with boolean values.
    Returns
    -------
    out : tvm.te.Tensor
        Indices of non-zero elements.
    """
    a = output_tensor(output_shape, "int32")
    a1 = condition.shape[0]
    a2 = condition.shape[1]
    a3 = condition.shape[2]
    a4 = condition.shape[3]
    valid_index = 0
    for i1 in range(a1):
        for i2 in range(a2):
            for i3 in range(a3):
                for i4 in range(a4):
                    if condition[i1, i2, i3, i4] != 0:
                        a[valid_index, 0] = i1
                        a[valid_index, 1] = i2
                        a[valid_index, 2] = i3
                        a[valid_index, 3] = i4
                        valid_index += 1
    return a