class_docstr: A class for updating Jupyter notebook (``*.ipynb``) files.
  
  For more on this file format, see
  https://ipython.org/ipython-doc/dev/notebook/nbformat.html#nbformat.
class_docstr_tok: ["A","class","for","updating","Jupyter","notebook","(","``","*",".ipynb","``",")","files",".","For","more","on","this","file","format",",","see","https",":","\/\/ipython.org\/ipython-doc\/dev\/notebook\/nbformat.html","#","nbformat","."]
docstr: Checks if the cell's source uses either ``%%`` or ``!`` to execute shell commands.
  
  Args:
      cell (dict): A dictionary representation of a code cell from
          a Jupyter notebook. For more info, see
          https://ipython.org/ipython-doc/dev/notebook/nbformat.html#code-cells.
  
  Returns:
      bool: If the first line starts with ``%%`` or any line starts with ``!``.
docstr_tok: ["Checks","if","the","cell","'s","source","uses","either","``","%","%","``","or","``","!","``","to","execute","shell","commands",".","Args",":","cell","(","dict",")",":","A","dictionary","representation","of","a","code","cell","from","a","Jupyter","notebook",".","For","more","info",",","see","https",":","\/\/ipython.org\/ipython-doc\/dev\/notebook\/nbformat.html","#","code-cells",".","Returns",":","bool",":","If","the","first","line","starts","with","``","%","%","``","or","any","line","starts","with","``","!","``","."]
code: def _contains_shell_cmds(self, cell):
      """Checks if the cell's source uses either ``%%`` or ``!`` to execute shell commands.
  
      Args:
          cell (dict): A dictionary representation of a code cell from
              a Jupyter notebook. For more info, see
              https://ipython.org/ipython-doc/dev/notebook/nbformat.html#code-cells.
  
      Returns:
          bool: If the first line starts with ``%%`` or any line starts with ``!``.
      """
      source = cell["source"]
  
      if source[0].startswith("%"):
          return True
  
      return any(line.startswith("!") for line in source)
  
imports: from __future__ import absolute_import
  from abc import abstractmethod
  import json
  import logging
  import os
  import pasta
  from sagemaker.cli.compatibility.v2.ast_transformer import ASTTransformer
label_desc: Use image node_id 2 for calling the JupyterNotebookFileUpdater obj's underlying member method code with example usage: obj._contains_shell_cmds(cell) and returns: any, True