def METHOD_NAME(self, use_global_config):
    # DEV: analytics flag can be None which should not be taken as
    # enabled when global flag is disabled
    if use_global_config and self.global_config.analytics_enabled:
        return self.analytics_enabled is not False
    else:
        return self.analytics_enabled is True