def _track_arguments(name, args):
    """Parse function arguments and return (artist, track, mbid).  Only use
    with function that take those arguments."""
    if len(args) == 1:
        mbid = args[0]
        artist, track = None, None
    elif len(args) == 2:
        artist, track = args
        mbid = None
    else:
        raise TypeError('{0}() takes either (artist, track) or (mbid,)'.
            format(name))
    return artist, track, mbid
