apply is defined in the torch._C._FunctionBase class, but this class is not present in the python source. _FunctionBase is defined in C++ by using the python C API to hook C functions together into a single python class. We are looking for a function named THPFunction_apply. 
```c++
PyObject THPFunction_apply(PyObject cls, PyObject *inputs)
{
// Generates the graph node
  THPObjectPtr backward_cls(PyObject_GetAttrString(cls, "_backward_cls"));
  if (!backward_cls) return nullptr;
  THPObjectPtr ctx_obj(PyObject_CallFunctionObjArgs(backward_cls, nullptr));
  if (!ctx_obj) return nullptr;
  THPFunction ctx = (THPFunction)ctx_obj.get();
auto cdata = std::shared_ptr(new PyNode(std::move(ctx_obj)), deleteNode);