code: def to_filespec(cls, args, root='', exclude=None):
      
      result = {'globs': [os.path.join(root, arg) for arg in args]}
      if exclude:
        result['exclude'] = []
        for exclude in exclude:
          if hasattr(exclude, 'filespec'):
            result['exclude'].append(exclude.filespec)
          else:
            result['exclude'].append({'globs': [os.path.join(root, x) for x in exclude]})
      return result
docs: Return a dict representation of this glob list, relative to the buildroot.
  
      The format of the dict is {'globs': [ 'list', 'of' , 'strings' ]
                      (optional) 'exclude' : [{'globs' : ... }, ...] }
  
      The globs are in zglobs format.