def parse_walltime(wt_arg):
    """ Converts walltimes to format dd:hh:mm:ss.
    """
    # Clean the wt
    parts = wt_arg.split(":")
    wt_clean = ["{0:02d}".format(int(value)) for value in parts]
    # Pad with 00
    wt_clean = ["00"] * (4 - len(wt_clean)) + wt_clean
    # Join and return
    return ":".join(wt_clean)