def get_options(option_type, from_options):
    """Extract options for specified option type from all options

    :param option_type: the object of specified type of options
    :param from_options: all options dictionary
    :return: the dictionary of options for specified type, each option can be filled by value from all options
             dictionary or blank in case the option for specified type is not exist in all options dictionary
    """
    _options = dict()

    for key in option_type.keys:
        key_with_prefix = f'{option_type.prefix}{key}'
        if key not in from_options and key_with_prefix not in from_options:
            _options[key] = ''
        elif key in from_options:
            _options[key] = from_options.get(key)
        else:
            _options[key] = from_options.get(key_with_prefix)

    return _options
def get_options ( option_type , from_options ) : _options = dict ( ) for key in option_type . keys : key_with_prefix = f'{option_type.prefix}{key}' if key not in from_options and key_with_prefix not in from_options : _options [ key ] = '' elif key in from_options : _options [ key ] = from_options . get ( key ) else : _options [ key ] = from_options . get ( key_with_prefix ) return _options
Extract options for specified option type from all options

    :param option_type: the object of specified type of options
    :param from_options: all options dictionary
    :return: the dictionary of options for specified type, each option can be filled by value from all options
             dictionary or blank in case the option for specified type is not exist in all options dictionary