code: def Tag(env, target, source, *more_tags, **kw_tags):
      
      if not target:
          target=source
          first_tag=None
      else:
          first_tag=source
  
      if first_tag:
          kw_tags[first_tag[0]] = ''
  
      if len(kw_tags) == 0 and len(more_tags) == 0:
          raise UserError("No tags given.")
  
      # XXX: sanity checks
      for x in more_tags:
          kw_tags[x] = ''
  
      if not SCons.Util.is_List(target):
          target=[target]
      else:
          # hmm, sometimes the target list, is a list of a list
          # make sure it is flattened prior to processing.
          # TODO: perhaps some bug ?!?
          target=env.Flatten(target)
  
      for t in target:
          for (k,v) in kw_tags.items():
              # all file tags have to start with PACKAGING_, so we can later
              # differentiate between "normal" object attributes and the
              # packaging attributes. As the user should not be bothered with
              # that, the prefix will be added here if missing.
              if k[:10] != 'PACKAGING_':
                  k='PACKAGING_'+k
              t.Tag(k, v)
docs: Tag a file with the given arguments, just sets the accordingly named
      attribute on the file object.
  
      TODO: FIXME