import click


def _parse_output_dir(f):
    """Function to parse output dir option on the command line."""
    return click.argument('output_dir',
                          type=click.Path(exists=True, file_okay=False, writable=True))(f)