def args_cleanup( args, s ):
    """
        Clean-up the substring s for keys in args

        Arguments
        ---------

            args: The dictionary to be parsed
            s   : Substring to be discarded. e.g. s = '--', then "--record" --> "record"

    """
    if not isinstance( args, dict ) or not isinstance( s, str ):
        raise ValueError( "Wrong input type. args should be type dict and s should be type str. {0:} and {1:} are rather given".format(
                                                                                            type( args ), type( str ) ) )

    for old_key in list( args ) :
        new_key = old_key.replace( s, '' )
        args[ new_key ] = args.pop( old_key )

    return args