For every utterance, calculate the size it will need in memory.
198004
def _scan(self):
        
        utt_sizes = {}

        for dset_name in self.utt_ids:
            per_container = []

            for cnt in self.containers:
                dset = cnt._file[dset_name]
                dtype_size = dset.dtype.itemsize

                record_size = dtype_size * dset.size
                per_container.append(record_size)

            utt_size = sum(per_container)

            if utt_size > self.partition_size:
                raise ValueError('Records in "{0}" are larger than the partition size'.format(dset_name))

            utt_sizes[dset_name] = utt_size

        return utt_sizes
1188909
def _mem(self):
        """"""
        value = int(psutil.virtual_memory().percent)
        set_metric("memory", value, category=self.category)
        gauge("memory", value)
638533
def use_size(self):
        ""
        if self._nodes is None:
            return self._use_size
        return sum(i.use_size() for i in self._nodes)
837846
def calculate_size(timeout, durability, transaction_type, thread_id):
    
    data_size = 0
    data_size += LONG_SIZE_IN_BYTES
    data_size += INT_SIZE_IN_BYTES
    data_size += INT_SIZE_IN_BYTES
    data_size += LONG_SIZE_IN_BYTES
    return data_size
650477
def size(self,value):
        '''
        
        '''
        if not self.params:
            self.params = dict(size=value)
            return self
        self.params['size'] = value
        return self
463820
def calculate_size(name, entry_processor, keys):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_data(entry_processor)
    data_size += INT_SIZE_IN_BYTES
    for keys_item in keys:
        data_size += calculate_size_data(keys_item)
    return data_size
403948
def any2mb(s):
    """"""
    if is_string(s):
        return int(Memory.from_string(s).to("Mb"))
    else:
        return int(s)
402112
function getMemory(size) {
  if (!staticSealed) return staticAlloc(size);
  if (!runtimeInitialized) return dynamicAlloc(size);
  return _malloc(size);
}
286141
def itemsize_bits(self):
        """"""
        if self.dtype is not None:
            return self.dtype.itemsize * 8
        else:
            return sum(x[1] for x in self.format)
235714
def calculate_size(name, key, thread_id):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_data(key)
    data_size += LONG_SIZE_IN_BYTES
    return data_size
272006
def calculate_size(name, expected, updated):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += BOOLEAN_SIZE_IN_BYTES
    if expected is not None:
        data_size += calculate_size_data(expected)
    data_size += BOOLEAN_SIZE_IN_BYTES
    if updated is not None:
        data_size += calculate_size_data(updated)
    return data_size
190318
def calculate_size(name, delta):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += LONG_SIZE_IN_BYTES
    return data_size
1137289
def calculate_size(name, function):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_data(function)
    return data_size
136694
function calculateSize(filepath) {
    return new Promise((fulfill, reject) => {
        fs.stat(filepath, (err, stats) => {
            if (err) return reject(err);
            fulfill(stats.size);
        });
    });
}
492534
def calculate_size(name, uuid, callable, address):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_str(uuid)
    data_size += calculate_size_data(callable)
    data_size += calculate_size_address(address)
    return data_size
122926
def calculate_size(name, entry_processor):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_data(entry_processor)
    return data_size
114979
def calculate_size(name, id):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_str(id)
    return data_size