code: def stop_app(self, package_name, clear=False):
          '''
          Stop application
  
          Args:
              package_name: string like com.example.app1
              clear: bool, remove user data
  
          Returns:
              None
          '''
          if clear:
              self.adb_shell(['pm', 'clear', package_name])
          else:
              self.adb_shell(['am', 'force-stop', package_name])
          return self stop_app(self, package_name, clear=False):
          '''
          Stop application
  
          Args:
              package_name: string like com.example.app1
              clear: bool, remove user data
  
          Returns:
              None
          '''
          if clear:
              self.adb_shell(['pm', 'clear', package_name])
          else:
              self.adb_shell(['am', 'force-stop', package_name])
          return self
docs: Stop application
  
          Args:
              package_name: string like com.example.app1
              clear: bool, remove user data
  
          Returns:
              None