    def get_first_non_empty_input_if_any(inputs: List[Tensor]) -> Tuple[Tensor, int]:
        """Return the first non-empty input and its index from the list.
        If all inputs are empty, return the first input.
        """
        assert len(inputs) > 0, "len(inputs) must be > 0!"
        t = None
        idx = 0
        for i, inp in enumerate(inputs):
            if not shape_utils.is_empty_rank1_tensor(inp._attrs["shape"]):
                return (inp, i)
        if t is None:
            t = inputs[0]
        return (t, idx)
Return the first non-empty input and its index from the list.
If all inputs are empty, return the first input.
python/aitemplate/compiler/ops/tensor/concatenate.py