# Various utility functions
import os


SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production'


def cached_function(func):
    data = {}

    def wrapper(*args):
        if not SHOULD_CACHE:
            return func(*args)
        cache_key = ' '.join([str(x) for x in args])
        if cache_key not in data:
            data[cache_key] = func(*args)
        return data[cache_key]

    wrapper.__name__ = func.__name__
    return wrapper

# Various utility functions
import os


SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production'


def cached_function(func):
    data = {}

    def wrapper(*args):
        if not SHOULD_CACHE:
            return func(*args)
        cache_key = ' '.join([str(x) for x in args])
        if cache_key not in data:
            data[cache_key] = func(*args)
        return data[cache_key]

    wrapper.__qualname__ = func.__qualname__
    return wrapper

Update cached_function wrapper to set qualname instead of name
Update cached_function wrapper to set qualname instead of name
