'Returns an index-suffixed unique name for the given prefix.
This is used for auto-generating layer names based on the type-prefix.'

def get_unique_name(self, prefix):

    ident = (sum((t.startswith(prefix) for (t, _) in self.layers.items())) + 1)
    return ('%s_%d' % (prefix, ident))
