def apply_units_to_cache(self, data):
        """
        Applies units to data when a proxy reader is used. For example if the
        data is cached as JSON and retrieved using the
        :class:`~simkit.core.data_readers.JSONReader`, then units can be
        applied from the original parameter schema.

        :param data: Data read by proxy reader.
        :return: data with units applied
        """
        # if units key exists then apply
        for k, v in self.parameters.iteritems():
            if v and v.get('units'):
                data[k] = Q_(data[k], v.get('units'))
        return data
def apply_units_to_cache ( self , data ) : for k , v in self . parameters . iteritems ( ) : if v and v . get ( 'units' ) : data [ k ] = Q_ ( data [ k ] , v . get ( 'units' ) ) return data
Applies units to data when a proxy reader is used. For example if the
        data is cached as JSON and retrieved using the
        :class:`~simkit.core.data_readers.JSONReader`, then units can be
        applied from the original parameter schema.

        :param data: Data read by proxy reader.
        :return: data with units applied