def options_getter(command_options):
def get_options(option_func=None):<EOL><INDENT>from optparse import make_option<EOL>from django.core.management.base import BaseCommand<EOL>func = option_func or make_option<EOL>options = tuple([func(*option.args, **option.kwargs) for option in command_options])<EOL>if option_func is None:<EOL><INDENT>if VERSION < (<NUM_LIT:1>, <NUM_LIT:8>):<EOL><INDENT>result = BaseCommand.option_list + options<EOL><DEDENT>else:<EOL><INDENT>result = []<EOL><DEDENT><DEDENT>else:<EOL><INDENT>result = options<EOL><DEDENT>return result<EOL><DEDENT>return get_options<EOL>
Compatibility function to get rid of optparse in management commands after Django 1.10.

    :param tuple command_options: tuple with `CommandOption` objects.