  def SetTags(self, new_tags: List[str]) -> None:
    """Sets tags for the compute instance.

    Tags are used to configure firewall rules and network routes.

    Args:
      new_tags (List[str]): A list of tags. Each tag must be 1-63
          characters long, and comply with RFC1035.

    Raises:
      InvalidNameError: If the name of the tags does not
          comply with RFC1035.
    """

    logger.info(
        self.FormatLogMessage(
            ', adding tags {0!s} to instance '
            '{1:s}.'.format(new_tags, self.name)))
    for tag in new_tags:
      if not common.COMPUTE_RFC1035_REGEX.match(tag):
        raise errors.InvalidNameError(
            'Network Tag {0:s} does not comply with {1:s}.'.format(
                tag, common.COMPUTE_RFC1035_REGEX.pattern),
            __name__)

    get_operation = self.GetOperation()
    tags_dict = get_operation['tags']
    existing_tags = tags_dict.get('items', [])
    tags_fingerprint = tags_dict['fingerprint']
    tags = existing_tags + new_tags
    request_body = {
        'fingerprint': tags_fingerprint,
        'items': tags,
    }

    gce_instance_client = self.GceApi().instances() # pylint: disable=no-member
    request = gce_instance_client.setTags(
        project=self.project_id,
        zone=self.zone,
        instance=self.name,
        body=request_body)
    response = request.execute()
    self.BlockOperation(response, zone=self.zone)
Sets tags for the compute instance.

Tags are used to configure firewall rules and network routes.

Args:
new_tags (List[str]): A list of tags. Each tag must be 1-63
characters long, and comply with RFC1035.

Raises:
InvalidNameError: If the name of the tags does not
comply with RFC1035.
libcloudforensics/providers/gcp/internal/compute.py