def METHOD_NAME(
    self,
    hint=None,
    contributes=None,
    values=None,
    tree_label=None,
    is_prefix_frame=None,
    is_sentinel_frame=None,
):
    """Updates an already existing component with new values."""
    if hint is not None:
        self.hint = hint
    if values is not None:
        if contributes is None:
            contributes = _calculate_contributes(values)
        if tree_label is None:
            tree_label = calculate_tree_label(values)
        self.values = values
    if contributes is not None:
        self.contributes = contributes
    if tree_label is not None:
        self.tree_label = tree_label
    if is_prefix_frame is not None:
        self.is_prefix_frame = is_prefix_frame
    if is_sentinel_frame is not None:
        self.is_sentinel_frame = is_sentinel_frame