code: def emit_containers(self, containers, verbose=True):
          
          containers = sorted(containers, key=lambda c: c.get('name'))
          task_definition = {
              'family': self.family,
              'containerDefinitions': containers,
              'volumes': self.volumes or []
          }
          if verbose:
              return json.dumps(task_definition, indent=4, sort_keys=True)
          else:
              return json.dumps(task_definition)
docs: Emits the task definition and sorts containers by name
  
          :param containers: List of the container definitions
          :type containers: list of dict
  
          :param verbose: Print out newlines and indented JSON
          :type verbose: bool
  
          :returns: The text output
          :rtype: str