nodes: 0, module; 1, function_definition; 2, function_name:emit_containers; 3, parameters; 4, block; 5, identifier:self; 6, identifier:containers; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, if_statement; 12, identifier:verbose; 13, True; 14, comment:"""
          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
          """; 15, assignment; 16, assignment; 17, identifier:verbose; 18, block; 19, else_clause; 20, identifier:containers; 21, call; 22, identifier:task_definition; 23, dictionary; 24, return_statement; 25, block; 26, identifier:sorted; 27, argument_list; 28, pair; 29, pair; 30, pair; 31, call; 32, return_statement; 33, identifier:containers; 34, keyword_argument; 35, string; 36, attribute; 37, string; 38, identifier:containers; 39, string; 40, boolean_operator; 41, attribute; 42, argument_list; 43, call; 44, identifier:key; 45, lambda; 46, string_content:family; 47, identifier:self; 48, identifier:family; 49, string_content:containerDefinitions; 50, string_content:volumes; 51, attribute; 52, list; 53, identifier:json; 54, identifier:dumps; 55, identifier:task_definition; 56, keyword_argument; 57, keyword_argument; 58, attribute; 59, argument_list; 60, lambda_parameters; 61, call; 62, identifier:self; 63, identifier:volumes; 64, identifier:indent; 65, integer:4; 66, identifier:sort_keys; 67, True; 68, identifier:json; 69, identifier:dumps; 70, identifier:task_definition; 71, identifier:c; 72, attribute; 73, argument_list; 74, identifier:c; 75, identifier:get; 76, string; 77, string_content:name
code: def emit_containers(self, containers, verbose=True):
          """
          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
          """
          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)