code: def calculate_size(name, entries):
      
      data_size = 0
      data_size += calculate_size_str(name)
      data_size += INT_SIZE_IN_BYTES
      for key, val in six.iteritems(entries):
          data_size += calculate_size_data(key)
          data_size += calculate_size_data(val)
      return data_size
docs: Calculates the request payload size