def _tag_depth(path, depth=None):
    """Add depth tag to path."""
    if not path or path[0] != '/':
        raise ValueError('Path must start with /!')
    if depth is None:
        depth = path.count('/')
    return '{}{}'.format(depth, path).encode('utf-8')
