Understanding Getattribute call in class

Hi i have below class. Please help ans below queries

class SplitData():
    def __init__(self, train, valid): 
      print('splid data')
      self.train,self.valid = train,valid
        
    def __getattr__(self,k): 
      print('__getattr',k)
      return getattr(self.train,k)
   def __repr__(self): return f'{self.__class__.__name__}\nTrain: {self.train}\nValid: {self.valid}\n'
  1. which getattr gets called in return

2)why do i get the below ouput for print statement i have put inside getattr
__getattr ipython_canary_method_should_not_exist
__getattr ipython_display
__getattr ipython_canary_method_should_not_exist
__getattr repr_mimebundle
__getattr ipython_canary_method_should_not_exist
__getattr repr_html
__getattr ipython_canary_method_should_not_exist
__getattr repr_markdown
__getattr ipython_canary_method_should_not_exist
__getattr repr_svg
__getattr ipython_canary_method_should_not_exist
__getattr repr_png
__getattr ipython_canary_method_should_not_exist
__getattr repr_pdf
__getattr ipython_canary_method_should_not_exist
__getattr repr_jpeg
__getattr ipython_canary_method_should_not_exist
__getattr repr_latex
__getattr ipython_canary_method_should_not_exist
__getattr repr_json
__getattr ipython_canary_method_should_not_exist
__getattr repr_javascript

SplitData
Train: ImageList (12894 items)…so on