def setup_parser(parser):
    """
    Setup argument parser.
    :param parser: argument parser
    :return: configured parser
    """
    parser.add_argument('--scheduler', required=False, default="local",
                        help="Dask scheduler ip:port for remote scheduler,'local' "
                             "or empty  for creating default local cluster.")
    parser.add_argument('--local-n-workers', required=False, type=int, default=2,
                        help="Number of Dask workers.")
    parser.add_argument('--local-threads-per-worker', required=False, type=int, default=6,
                        help="Number of threads per Dask worker.")
    parser.add_argument('--local-memory-limit', required=False, default="2G",
                        help="Memory limit of Dask worker.")

    return parser