changing record_size to same value of previous one
inside of the function: flush_queue, the value of record_size is different from the previous one, they are in different formats.
The sys.getsizeof not work with nested dict, so to solve that we need to create a function to iterate inside o a nested dict.
to solve that I'm using this function: get_size_in_bytes
because we are dividing / 1048576, we are converting bytes to MiB
and because of that, we need to change the name of vars, which are using bytes in their names
in short, we need to do those changes because we aren't getting the correct value of the same record (dict) when they are nested.
1: was put them in the same metric for all counts of records (record_size), in this case, MiB;
2: was create a function to get the correct value of a record;
3: changing the name o vars that are using byte -> mebibytes;