import copy
import hashlib


def get_path_from_args(args):
    """ Returns a unique hash for an argparse object. """
    a = copy.copy(args)
    del a.rerun
    a = str(a)
    path = hashlib.md5(a.encode()).hexdigest()
    return path