# tfma.utils.unique_key

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/utils/util.py#L381-L401) |

Returns a unique key given a list of current keys.

    tfma.utils.unique_key(
        key: str, current_keys: List[str], update_keys: Optional[bool] = False
    ) -> str

If the key exists in current_keys then a new key with _1, _2, ..., etc
appended will be returned, otherwise the key will be returned as passed.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `key` | desired key name. |
| `current_keys` | List of current key names. |
| `update_keys` | True to append the new key to current_keys. |

<br />