def _parse_cli_args():
    """Parse the arguments from CLI using ArgumentParser
    :return: The arguments parsed by ArgumentParser
    :rtype: Namespace
    """
    parser = argparse.ArgumentParser()
    parser.add_argument(
        '-g',
        help='The photoset id to be downloaded',
        metavar='<photoset_id>'
    )
    parser.add_argument(
        '-s',
        default=1,
        help=(
            'Image size. 12 is smallest, 1 is original size. '
            'Default: 1'
        ),
        type=int,
        choices=xrange(0, 10),
        metavar='<num>'
    )
    parser.add_argument(
        '-d',
        default=None,
        help=(
            'The path to store the downloaded images. '
            'Automatically create it if not exist. '
            'Default use the photoset id as folder name under current path'
        ),
        metavar='<path>'
    )
    parser.add_argument(
        '-O',
        default=1,
        help=(
            '0 for single process, '
            '1 for multithread. '
            '2 for event driven. '
            'Default: 1'
        ),
        type=int,
        choices=xrange(0, 3),
        metavar='<num>'
    )
    parser.add_argument(
        '-u',
        help=(
            'Set your API key'
        ),
        action='store_true'
    )
    args = parser.parse_args()
    logger.debug(args)
    return args