> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.import_utils.patch_object

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### patch\_object

```python theme={null}
patch_object(
    o: ~T,
    *,
    missing_modules: dict[str, str],
    dep_target: str,
    fail_if_not_patchable: bool = True,
    except_for: str | Iterable[str] | None = None
) -> ~T
```

<b>Parameters:</b>

| Name                    | Description                                                          |
| ----------------------- | -------------------------------------------------------------------- |
| `o`                     | **Type:** \~T                                                        |
| `missing_modules`       | **Type:** dict\[str, str]                                            |
| `dep_target`            | **Type:** str                                                        |
| `fail_if_not_patchable` | **Type:** bool<br /><br />**Default:** True                          |
| `except_for`            | **Type:** str \| Iterable\[str] \| None<br /><br />**Default:** None |

<br />
