code: def _select_filepath(self, filepath):
          
  
          if filepath is None:
              return self.default_filepath
          else:
              if os.path.basename(filepath) == '':
                  filepath = os.path.join(filepath, os.path.basename(
                      self.default_filepath))
              return filepath
docs: Make a choice between ``filepath`` and ``self.default_filepath``.
  
          Args
          ----
          filepath: str
              the filepath to be compared with ``self.default_filepath``
  
          Returns
          -------
          str
              The selected filepath