code: def flatsize(obj, align=0, **opts):
      '''Return the flat size of an object (in bytes),
         optionally aligned to a given power of 2.
  
         See function **basicsize** for a description of
         the other options.  See the documentation of
         this module for the definition of flat size.
      '''
      v = _typedefof(obj, **opts)
      if v:
          if align > 1:
              m = align - 1
              if (align & m) != 0:
                  raise ValueError('invalid option: %s=%r' % ('align', align))
          else:
              m = 0
          v = v.flat(obj, m)
      return f flatsize(obj, align=0, **opts):
      '''Return the flat size of an object (in bytes),
         optionally aligned to a given power of 2.
  
         See function **basicsize** for a description of
         the other options.  See the documentation of
         this module for the definition of flat size.
      '''
      v = _typedefof(obj, **opts)
      if v:
          if align > 1:
              m = align - 1
              if (align & m) != 0:
                  raise ValueError('invalid option: %s=%r' % ('align', align))
          else:
              m = 0
          v = v.flat(obj, m)
      return v
docs: Return the flat size of an object (in bytes),
         optionally aligned to a given power of 2.
  
         See function **basicsize** for a description of
         the other options.  See the documentation of
         this module for the definition of flat size.