'Return an instance of VariantMap equivalent to self.
Returns:
VariantMap: a copy of self'

def copy(self):

    clone = VariantMap(self.spec)
    for (name, variant) in self.items():
        clone[name] = variant.copy()
    return clone
