def date(date_str):
    try:
        return dt.strptime(date_str, "%Y-%m-%d")
    except __HOLE__:
        msg = "Not a valid date: '{date_str}'. "\
              "Expected format: YYYY-MM-DD.".format(date_str=date_str)
        raise argparse.ArgumentTypeError(msg)
dataset/ETHPy150Open PressLabs/silver/silver/management/commands/generate_docs.py/date