def get_dlc_io_config(dlc_path: str, input_names: list[str], output_names: list[str]) -> str:
    """Get the input/output config of a DLC file.

    dlc_path: path to the DLC file.
    input_names: list of input names of source model.
    output_names: list of output names of source model.
    """
    with tempfile.TemporaryDirectory() as tmp_folder:
        tmp_csv = Path(tmp_folder) / "dlc_info.csv"
        dlc_info = get_dlc_info(dlc_path, csv_path=str(tmp_csv))

        # add the :0 suffix to the input/output names if present in the DLC
        # SNPE adds this suffix to the input/output names in the DLC if the source model is TensorFlow
        if f"{input_names[0]}:0" in dlc_info:
            input_names = [f"{name}:0" for name in input_names]
            output_names = [f"{name}:0" for name in output_names]

        input_dims = {}
        output_dims = {}
        with tmp_csv.open() as f:
            out = csv.reader(f)
            for row in out:
                if len(row) == 8:
                    _, name, _, input_item, output, shape, _, _ = tuple(row)
                    # version 2.x has 'name type'
                    output = output.split(" ")[0]
                    # input name in this format for versions 1.x
                    if name == input_item and name == output and name and name in input_names:
                        input_dims[name] = list(map(int, shape.split("x")))
                    elif output in output_names:
                        output_dims[output] = list(map(int, shape.split("x")))
                if len(row) == 3:
                    name, shape, _ = tuple(row)
                    # input name in this format for versions 2.x
                    if name in input_names:
                        input_dims[name] = list(map(int, shape.split(",")))

    return {
        "input_names": input_names,
        "input_shapes": [input_dims[name] for name in input_names],
        "output_names": output_names,
        "output_shapes": [output_dims[name] for name in output_names],
    }
Get the input/output config of a DLC file.

    dlc_path: path to the DLC file.
    input_names: list of input names of source model.
    output_names: list of output names of source model.
    
olive/platform_sdk/qualcomm/snpe/tools/dev.py