def simple_method_io(method, cdt, indataname, outdataname):
    """
    Helper function to create inputs and outputs for a simple
    Method with one input, one output, and the same CompoundDatatype
    for both incoming and outgoing data.
    """
    minput = method.create_input(compounddatatype=cdt,
                                 dataset_name=indataname,
                                 dataset_idx=1)
    minput.clean()
    moutput = method.create_output(compounddatatype=cdt,
                                   dataset_name=outdataname,
                                   dataset_idx=1)
    moutput.clean()
    method.clean()
    return minput, moutput