code: def _ConditionalFormatMessages(self, event_values):
      
      # Using getattr here to make sure the attribute is not set to None.
      # if A.b = None, hasattr(A, b) is True but getattr(A, b, None) is False.
      string_pieces = []
      for map_index, attribute_name in enumerate(self._format_string_pieces_map):
        if not attribute_name or attribute_name in event_values:
          if attribute_name:
            attribute = event_values.get(attribute_name, None)
            # If an attribute is an int, yet has zero value we want to include
            # that in the format string, since that is still potentially valid
            # information. Otherwise we would like to skip it.
            # pylint: disable=unidiomatic-typecheck
            if (not isinstance(attribute, (bool, float)) and
                not isinstance(attribute, py2to3.INTEGER_TYPES) and
                not attribute):
              continue
  
          string_pieces.append(self.FORMAT_STRING_PIECES[map_index])
  
      format_string = self.FORMAT_STRING_SEPARATOR.join(string_pieces)
  
      string_pieces = []
      for map_index, attribute_name in enumerate(
          self._format_string_short_pieces_map):
        if not attribute_name or event_values.get(attribute_name, None):
          string_pieces.append(self.FORMAT_STRING_SHORT_PIECES[map_index])
      short_format_string = self.FORMAT_STRING_SEPARATOR.join(string_pieces)
  
      return self._FormatMessages(
          format_string, short_format_string, event_values)
docs: Determines the conditional formatted message strings.
  
      Args:
        event_values (dict[str, object]): event values.
  
      Returns:
        tuple(str, str): formatted message string and short message string.