If this is only used when building Python bindings then it should go inside the if block below.