@staticmethod
def _map_multiple_inputs(inputs: dict, reduce_dim: bool) ->tuple:
    """Creates mapping between multiple input variables and a single output variable.

        Parameters
        ----------
        inputs
            Input variables.
        reduce_dim
            If true, input variables will be summed up, if false, they will be concatenated.

        Returns
        -------
        tuple
            Summed up or concatenated input variables and the mapping to the respective input variables

        """
    inputs_unique = []
    input_mapping = {}
    for key, var in inputs.items():
        node, in_op, in_var = key.split('/')
        i = 0
        inp = in_var
        while inp in inputs_unique:
            i += 1
            if inp[-2:] == f'_{i - 1}':
                inp = inp[:-2] + f'_{i}'
            else:
                inp = f'{inp}_{i}'
        inputs_unique.append(inp)
        input_mapping[inp] = key
    if reduce_dim:
        inputs_unique = f"sum(({','.join(inputs_unique)}), 0)"
    else:
        idx = 0
        var = inputs[input_mapping[inputs_unique[idx]]]
        while not hasattr(var, 'shape'):
            idx += 1
            var = inputs[input_mapping[inputs_unique[idx]]]
        shape = var['shape']
        if len(shape) > 0:
            inputs_unique = (
                f"reshape(({','.join(inputs_unique)}), ({len(inputs_unique) * shape[0],}))"
                )
        else:
            inputs_unique = f"stack({','.join(inputs_unique)})"
    return inputs_unique, input_mapping
