def gen_link(name, visual=None, collision=None):
    """
    Generates (as a string) the complete urdf element sequence for a `link`
    element. This is essentially a string concatenation operation.

    If `collision` is not provided, a duplicate of `visual` will be used
    instead.

    :param name: Name of the link, ``str``
    :param visual: urdf element sequence for the visual child, ``str``
    :param collision: urdf element sequence for the collision child, ``str``
    :returns: urdf element sequence for a `link`, ``str``
    """
    if visual is None:
        visual = ''
    if collision is None:
        collision=visual.replace('visual', 'collision')
    return '<link name="{0}">{1}{2}</link>'.format(name, visual, collision)