def wrap( wrappee ):
   """Wrap the given object, module or function in a Python wrapper."""
   if isinstance( wrappee, types.BuiltinFunctionType ):
      return _ProfileWrapFunction( wrappee )
   else:
      return _ProfileWrapObject( wrappee )
Wrap the given object, module or function in a Python wrapper.
recipes/Python/81535_Allowing_Pythprofiler_profile_C/recipe-81535.py