def find_argument_target(xmrs, nodeid, rargname):
    """
    Return the target of an argument (rather than just the variable).

    Args:
        xmrs: The [Xmrs] object to use.
        nodeid: The nodeid of the argument.
        rargname: The role-argument name of the argument.
    Returns:
        The object that is the target of the argument. Possible values
        include:

        | Arg value          | e.g.  | Target                        |
        | ------------------ | ----- | ----------------------------- |
        | intrinsic variable | x4    | nodeid; of the EP with the IV |
        | hole variable      | h0    | nodeid; HCONS's labelset head |
        | label              | h1    | nodeid; label's labelset head |
        | unbound variable   | i3    | the variable itself           |
        | constant           | "IBM" | the constant itself           |

    Note:
        If the argument value is an intrinsic variable whose target is
        an EP that has a quantifier, the non-quantifier EP's nodeid
        will be returned. With this nodeid, one can then use
        find_quantifier() to get its quantifier's nodeid.
    """
    tgt = xmrs.args(nodeid)[rargname]
    if tgt in xmrs.variables():
        try:
            return xmrs.nodeid(tgt)
        except KeyError:
            pass

        try:
            tgt = xmrs.hcon(tgt).lo
            return next(iter(xmrs.labelset_heads(tgt)), None)
        except KeyError:
            pass

        try:
            return next(iter(xmrs.labelset_heads(tgt)))
        except (KeyError, StopIteration):
            pass
    return tgt