Implement the __get_object function