Main function for cli.

def main(args=None, transform_func=None):
    """Main function for cli."""
    args = get_args(args)

    utils.init_log(args.log_level)

    try:
        config = _get_config(args)
    except Dump2PolarionException as err:
        logger.fatal(err)
        return 1

    return dumper(args, config, transform_func=transform_func)