docs: def _normalize_tags_type(self, tags, device_name=None, metric_name=None):
          """
          Normalize tags contents and type:
          - append `device_name` as `device:` tag
          - normalize tags type
          - doesn't mutate the passed list, returns a new list
          """
          normalized_tags = []
  
          if device_name:
              self._log_deprecation('device_name')
              normalized_tags.append('device:{}'.format(ensure_unicode(device_name)))
  
          if tags is not None:
              for tag in tags:
                  if tag is None:
                      continue
                  if not isinstance(tag, str):
                      try:
                          tag = tag.decode('utf-8')
                      except Exception:
                          self.log.warning(
                              'Error decoding tag `{}` as utf-8 for metric `{}`, ignoring tag'.format(tag, metric_name)
                          )
                          continue
  
                  normalized_tags.append(tag)
  
          return normalized_tags