code: def _get_calculated_size(self, size, data):
          
          # if the size is derived from a lambda function, run it now; otherwise
          # return the value we passed in or the length of the data if the size
          # is None (last field value)
          if size is None:
              return len(data)
          elif isinstance(size, types.LambdaType):
              expanded_size = size(self.structure)
              return self._get_calculated_size(expanded_size, data)
          else:
              return size
docs: Get's the final size of the field and runs the lambda functions
          recursively until a final size is derived. If size is None then it
          will just return the length of the data as it is assumed it is the
          final field (None should only be set on size for the final field).
  
          :param size: The size to calculate/expand
          :param data: The data that the size is being calculated for
          :return: The final size