'Returns a default attribute if it is not set.'

def GetDefault(self, fd=None, default=None):

    if callable(self.default):
        return self.default(fd)
    if (self.default is not None):
        if isinstance(self.default, rdfvalue.RDFValue):
            default = self.default.Copy()
            default.attribute_instance = self
            return self(default)
        else:
            return self(self.default)
    if isinstance(default, rdfvalue.RDFValue):
        default = default.Copy()
        default.attribute_instance = self
    return default
