def _get_xunit_setup_teardown(holder, attr_name, param_obj=None):
 param_obj = (param_obj if (param_obj is not None) else holder)
 result = _get_xunit_func(holder, attr_name)
 if (result is not None):
  arg_count = result.__code__.co_argcount
  if inspect.ismethod(result):
   arg_count -= 1
  if arg_count:
   return (lambda : result(param_obj))
  else:
   return result

def _get_xunit_setup_teardown ( holder , attr_name , param_obj = None ) : param_obj = ( param_obj if ( param_obj is not None ) else holder ) result = _get_xunit_func ( holder , attr_name ) if ( result is not None ) : arg_count = result . __code__ . co_argcount if inspect . ismethod ( result ) : arg_count -= 1 if arg_count : return ( lambda : result ( param_obj ) ) else : return result
return a callable to perform xunit-style setup or teardown if the function exists in the holder object .