def _build_duplicate_widget_message(widget_type, user_key=None):
    if (user_key is not None):
        message = textwrap.dedent("\n            There are multiple identical `st.{widget_type}` widgets with\n            `key='{user_key}'`.\n\n            To fix this, please make sure that the `key` argument is unique for\n            each `st.{widget_type}` you create.\n            ")
    else:
        message = textwrap.dedent("\n            There are multiple identical `st.{widget_type}` widgets with the\n            same generated key.\n\n            (When a widget is created, it's assigned an internal key based on\n            its structure. Multiple widgets with an identical structure will\n            result in the same internal key, which causes this error.)\n\n            To fix this, please pass a unique `key` argument to\n            `st.{widget_type}`.\n            ")
    return message.strip('\n').format(widget_type=widget_type, user_key=user_key)
def _build_duplicate_widget_message(widget_type, user_key=None):
    if (user_key is not None):
        message = textwrap.dedent("\n            There are multiple identical `st.{widget_type}` widgets with\n            `key='{user_key}'`.\n\n            To fix this, please make sure that the `key` argument is unique for\n            each `st.{widget_type}` you create.\n            ")
    else:
        message = textwrap.dedent("\n            There are multiple identical `st.{widget_type}` widgets with the\n            same generated key.\n\n            (When a widget is created, it's assigned an internal key based on\n            its structure. Multiple widgets with an identical structure will\n            result in the same internal key, which causes this error.)\n\n            To fix this, please pass a unique `key` argument to\n            `st.{widget_type}`.\n            ")
    return message.strip('\n').format(widget_type=widget_type, user_key=user_key)