<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _calc_size_stats(self):
 """ get the size in bytes and num records of the content """

        self.total_records = 0
        self.total_length = 0
        self.total_nodes = 0
        if type(self.content['data']) is dict:
            self.total_length += len(str(self.content['data']))
            self.total_records += 1
            self.total_nodes = sum(len(x) for x in self.content['data'].values())
                               
        elif hasattr(self.content['data'], '__iter__') and type(self.content['data']) is not str:
            self._get_size_recursive(self.content['data'])
        else:
            self.total_records += 1
            self.total_length += len(str(self.content['data']))
            
        return str(self.total_records) + ' records [or ' +  str(self.total_nodes) + ' nodes], taking ' + str(self.total_length) + ' bytes'