code: def InitializeDebuggeeLabels(self, flags):
      
      self._debuggee_labels = {}
  
      for (label, var_names) in six.iteritems(_DEBUGGEE_LABELS):
        # var_names is a list of possible environment variables that may contain
        # the label value. Find the first one that is set.
        for name in var_names:
          value = os.environ.get(name)
          if value:
            # Special case for module. We omit the "default" module
            # to stay consistent with AppEngine.
            if label == labels.Debuggee.MODULE and value == 'default':
              break
            self._debuggee_labels[label] = value
            break
  
      if flags:
        self._debuggee_labels.update(
            {name: value for (name, value) in six.iteritems(flags)
             if name in _DEBUGGEE_LABELS})
  
      self._debuggee_labels['projectid'] = self._project_id
docs: Initialize debuggee labels from environment variables and flags.
  
      The caller passes all the flags that the the debuglet got. This function
      will only use the flags used to label the debuggee. Flags take precedence
      over environment variables.
  
      Debuggee description is formatted from available flags.
  
      Args:
        flags: dictionary of debuglet command line flags.