def get_model_io_names(model):
    """Gets names of the input and output nodes of the model

    Args:
        model (keras Model): model to parse

    Returns:
        inputs (list): names of all the input nodes
        outputs (list): names of all the output nodes
    """

    num_inputs = len(model.inputs)
    num_outputs = len(model.outputs)
    inputs = []
    outputs = []
    for i in range(num_inputs):
        nm = model.inputs[i].name.split(':')[0].split('/')[0]
        inputs.append(nm)
    for i in range(num_outputs):
        nm = model.outputs[i].name.split(':')[0].split('/')[0]
        outputs.append(nm)
    return inputs, outputs