def get_app_settings(parser, known_args):
    """
    Return **settings** module of the application according to
    either command line argument or **SHELTER_SETTINGS_MODULE**
    environment variable.
    """
    args, dummy_remaining = parser.parse_known_args(known_args)
    settings_module_path = (
        args.settings or os.environ.get('SHELTER_SETTINGS_MODULE', ''))
    if not settings_module_path:
        return None
    return importlib.import_module(settings_module_path)
Return **settings** module of the application according to
    either command line argument or **SHELTER_SETTINGS_MODULE**
    environment variable.