<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def start_patching(name=None):
 # type: (Optional[str]) -> None """ Initiate mocking of the functions listed in `_factory_map`. For this to work reliably all mocked helper functions should be imported and used like this: import dp_paypal.client as paypal (i.e. don't use `from dp_paypal.client import x` import style) Kwargs: name (Optional[str]):
 if given, only patch the specified path, else all defined default mocks """

    global _factory_map, _patchers, _mocks
    if _patchers and name is None:
        warnings.warn('start_patching() called again, already patched')

    _pre_import()

    if name is not None:
        factory = _factory_map[name]
        items = [(name, factory)]
    else:
        items = _factory_map.items()

    for name, factory in items:
        patcher = mock.patch(name, new=factory())
        mocked = patcher.start()
        _patchers[name] = patcher
        _mocks[name] = mocked