Thank you for clarifying, @smth!
I’m with @geossy, preferring warnings to be resolved and to have none if possible.
Is there a workaround/hack to this situation if the class is defined in the notebook? (other than
moving the class outside of the notebook or supressing warnings)
Thank you!
p.s. also the warning has a weird paste of the chunk of its source after the warning is rendered in jupyter nb (last line below):
UserWarning: Couldn't retrieve source code for container of type MyClass. It won't be checked for correctness upon loading.
  "type " + obj.__name__ + ". It won't be checked