old_contents: #! usr/bin/env python3
  from docopt import docopt
  from matplotlib import pyplot
  
  
  class Schema:
      """
      Wraps the SQL source code for a schema and provides methods to get information about that schema.
      """
  
      def __init__(self, source):
          """
          Creates a new instance of Schema for the specified source code string.
          """
          self.source = source  
  
      def n_tables(self):
          """
          Returns the number of tables defined in the schema
          """
          pass #TODO: not yet implementend
  
      def n_keys(self):
          """
          Returns the number of keys defined in the schema
          """
          pass #TODO: not yet implementend
  
      def n_datatypes(self):
          """
          Returns the number of each data type in the schema.
          """
          pass #TODO: not yet implementend
  
      def lengths(self):
          """
          Returns a dictionary mapping each data type in the schema
          to a list of the lengths of those data types.
          """
          pass #TODO: not yet implementend
  
new_contents: #! usr/bin/env python3
  from docopt import docopt
  from matplotlib import pyplot
  import re
  
  
  class Schema:
      """
      Wraps the SQL source code for a schema and provides methods to get information about that schema.
      """
      
      table_def = re.compile(r"CREATE TABLE|create table")
  
      def __init__(self, source):
          """
          Creates a new instance of Schema for the specified source code string.
          """
          self.source = source  
  
      def n_tables(self):
          """
          Returns the number of tables defined in the schema
          """
          return len(table_def.findall(source))
  
      def n_keys(self):
          """
          Returns the number of keys defined in the schema
          """
          pass #TODO: not yet implementend
  
      def n_datatypes(self):
          """
          Returns the number of each data type in the schema.
          """
          pass #TODO: not yet implementend
  
      def lengths(self):
          """
          Returns a dictionary mapping each data type in the schema
          to a list of the lengths of those data types.
          """
          pass #TODO: not yet implementend
  
subject: Implement the `n_tables` method