def METHOD_NAME(self, role: str, targetpath: str) -> bool:
    """Add target to roles metadata and submit new metadata version"""
    # HACK: make sure we have the roles metadata in updater._trusted_set
    # (or that we're publishing the first version)
    try:
        self.updater.get_targetinfo(targetpath)
    except RepositoryError:
        # HACK Assume this is because we're just publishing version 1
        # (so the roles metadata does not exist on server yet)
        pass
    data = bytes(targetpath, "utf-8")
    targetfile = TargetFile.from_data(targetpath, data)
    try:
        with self.edit_targets(role) as delegated:
            delegated.targets[targetpath] = targetfile
    except Exception as e:  # pylint: disable=broad-except
        print(f"Failed to submit new {role} with added target: {e}")
        return False
    print(f"Uploaded role {role} v{delegated.version}")
    return True