@property
@functools.lru_cache(maxsize=None)
def is_valid_environment(self) -> bool:
    if (len(ALLOWED_ENVIRONMENTS) == 0):
        return True
    environment = get_environment()
    return ((environment is not None) and (environment in ALLOWED_ENVIRONMENTS))
@property
@functools.lru_cache(maxsize=None)
def is_valid_environment(self) -> bool:
    if (len(ALLOWED_ENVIRONMENTS) == 0):
        return True
    environment = get_environment()
    return ((environment is not None) and (environment in ALLOWED_ENVIRONMENTS))