<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_child_mock(mock, **kw):
 """Intercepts call to generate new mocks and raises instead"""

    attribute = "." + kw["name"] if "name" in kw else "()"
    mock_name = _extract_mock_name(mock) + attribute
    raise AttributeError(mock_name)