def __getitem__(self, key):
    if (key not in self.quantities):
        raise KeyError(key)
    q = self.quantities[key]

    def run_quantity_wrapper(quantity, quantity_name):

        @wraps(derived_quantity_registry[quantity_name][1])
        def run_quantity(*args, **kwargs):
            to_run = quantity(*args, **kwargs)
            return self.data_object.eval(to_run)
        return run_quantity
    return run_quantity_wrapper(q, key)
def __getitem__(self, key):
    if (key not in self.quantities):
        raise KeyError(key)
    q = self.quantities[key]

    def run_quantity_wrapper(quantity, quantity_name):

        @wraps(derived_quantity_registry[quantity_name][1])
        def run_quantity(*args, **kwargs):
            to_run = quantity(*args, **kwargs)
            return self.data_object.eval(to_run)
        return run_quantity
    return run_quantity_wrapper(q, key)