def _to_mel(data):
    """
    Convert a MockedPymelNode to a fully qualified dagpath.

    :param MockedPymelNode data: A PyNode-like object.
    :return: A fully qualified dagpath.
    :rtype: str
    """
    try:
        return data.__melobject__()
    except AttributeError:
        return data