def wrapper(*args, **kwargs):
    if (name in streamlit_methods):
        if (self._container == BlockPath_pb2.BlockPath.SIDEBAR):
            message = ('Method `%(name)s()` does not exist for `st.sidebar`. Did you mean `st.%(name)s()`?' % {'name': name})
        else:
            message = ('Method `%(name)s()` does not exist for `DeltaGenerator` objects. Did you mean `st.%(name)s()`?' % {'name': name})
    else:
        message = ('`%(name)s()` is not a valid Streamlit command.' % {'name': name})
    raise StreamlitAPIException(message)
def wrapper(*args, **kwargs):
    if (name in streamlit_methods):
        if (self._container == BlockPath_pb2.BlockPath.SIDEBAR):
            message = ('Method `%(name)s()` does not exist for `st.sidebar`. Did you mean `st.%(name)s()`?' % {'name': name})
        else:
            message = ('Method `%(name)s()` does not exist for `DeltaGenerator` objects. Did you mean `st.%(name)s()`?' % {'name': name})
    else:
        message = ('`%(name)s()` is not a valid Streamlit command.' % {'name': name})
    raise StreamlitAPIException(message)