double ob_fval;
} PyFloatObject;
The `PyObject_HEAD` is a macro that brings in the code that implements an object's reference counting, and a pointer to the corresponding type object. So in this case, to implement a float, the only other "state" needed is the floating point value itself.

Now, let's see the struct for our `THPTensor` type:
```cpp
struct THPTensor {
    PyObject_HEAD
    THTensor *cdata;
};

Pretty simple, right? We are just wrapping the underlying TH tensor by storing a pointer to it.
The key part is defining the "type object" for a new type. An example definition of a type object for our Python float takes the form:
```cpp
static PyTypeObject py_FloatType = {
    PyVarObject_HEAD_INIT(NULL, 0)
    "py.FloatObject",          / tp_name /
    sizeof(PyFloatObject),     / tp_basicsize /
    0,                         / tp_itemsize /
    0,                         / tp_dealloc /
    0,                         / tp_print /
    0,                         / tp_getattr /