Add format attribute to get_variable