import functools


def _CreatePatchedSetUp(func):
  """Create a setUp function that includes the SOAP implementation.

  Args:
    func: A reference to the original setUp function.

  Returns:
    The result of func called with soap_impl.
  """
  @functools.wraps(func)
  def SetUp(self):
    soap_impl = 'suds' if '_suds' in str(self) else 'zeep'
    return func(self, soap_impl)
  return SetUp