def get(self, obj, **kwargs):
        """Get an attribute from a value.

        :param obj: Object to get the attribute value from.
        :return: Value of object's attribute.
        """
        assert self.getter is not None, "Getter accessor is not specified."
        if callable(self.getter):
            return self.getter(obj, **_get_context(self._getter_argspec, kwargs))

        assert isinstance(self.getter, string_types), "Accessor must be a function or a dot-separated string."

        for attr in self.getter.split("."):
            if isinstance(obj, dict):
                obj = obj[attr]
            else:
                obj = getattr(obj, attr)

        if callable(obj):
            return obj()

        return obj
Get an attribute from a value.

        :param obj: Object to get the attribute value from.
        :return: Value of object's attribute.