Format the value of the attribute 'name' from the given object

def _get_formatted_val(self, obj, name, column):
        """
        Format the value of the attribute 'name' from the given object
        """
        attr_path = name.split('.')
        val = None
        tmp_val = obj
        for attr in attr_path:
            tmp_val = getattr(tmp_val, attr, None)
            if tmp_val is None:
                break
        if tmp_val is not None:
            val = tmp_val

        return format_value(column, val, self.config_key)