def _create_depend_tag(dep_type, name, version_eq=None, version_lt=None,
    version_lte=None, version_gt=None, version_gte=None):
    """Create xml snippet for package.xml."""
    version_string = []
    for key, var in {'version_eq': version_eq, 'version_lt': version_lt,
        'version_lte': version_lte, 'version_gt': version_gt, 'version_gte':
        version_gte}.items():
        if var is not None:
            version_string.append(' %s="%s"' % (key, var))
    result = '  <%s%s>%s</%s>\n' % (dep_type, ''.join(version_string), name,
        dep_type)
    return result
