def __setattr__(self, key: str, value: Any) -> None:
    try:
        object.__getattribute__(self, key)
        return object.__setattr__(self, key, value)
    except AttributeError:
        pass
    if ((key,) in self._internal.column_labels):
        self[key] = value
    else:
        msg = "pandas-on-Spark doesn't allow columns to be created via a new attribute name"
        if is_testing():
            raise AssertionError(msg)
        else:
            warnings.warn(msg, UserWarning)
def __setattr__(self, key: str, value: Any) -> None:
    try:
        object.__getattribute__(self, key)
        return object.__setattr__(self, key, value)
    except AttributeError:
        pass
    if ((key,) in self._internal.column_labels):
        self[key] = value
    else:
        msg = "pandas-on-Spark doesn't allow columns to be created via a new attribute name"
        if is_testing():
            raise AssertionError(msg)
        else:
            warnings.warn(msg, UserWarning)