def METHOD_NAME(
    self, cg: ConjunctiveGraph, tup: List[Union[str, None]]
) -> None:
    # all values check
    # subject, predicate, value, datatype cannot be None
    # language and graph may be None
    if tup[0] is None or tup[1] is None or tup[2] is None or tup[3] is None:
        raise ValueError(
            "subject, predicate, value, datatype cannot be None. Given: " f"{tup}"
        )
    # 1 - subject
    s: Union[URIRef, BNode]
    if tup[0].startswith("_"):
        s = BNode(value=tup[0].replace("_:", ""))
    else:
        s = URIRef(tup[0])
    # 2 - predicate
    p = URIRef(tup[1])
    # 3 - value
    o: Union[URIRef, BNode, Literal]
    if tup[3] == "globalId":
        o = URIRef(tup[2])
    elif tup[3] == "localId":
        o = BNode(value=tup[2].replace("_:", ""))
    else:  # literal
        if tup[4] is None:
            o = Literal(tup[2], datatype=URIRef(tup[3]))
        else:
            o = Literal(tup[2], lang=tup[4])
    # 6 - context
    if tup[5] is not None:
        c = URIRef(tup[5])
        # type error: Argument 1 to "add" of "ConjunctiveGraph" has incompatible type "Tuple[Union[URIRef, BNode], URIRef, Union[URIRef, BNode, Literal], URIRef]"; expected "Union[Tuple[Node, Node, Node], Tuple[Node, Node, Node, Optional[Graph]]]"
        cg.add((s, p, o, c))  # type: ignore[arg-type]
    else:
        cg.add((s, p, o))