def METHOD_NAME(self, result):
    """
    _format_
    Format the query results into the proper dictionary expected at the upper layer Python code.
    The input should be a list of database objects, each one representing a single line returned
    from the database with key names matching the column names from the sql query.
    The intermediate (not aggregated) result representing the primary database output in python should be
    a list of dictionaries one record per line returned from the database with key names mapped to the
    python code variable naming conventions.
    e.g.
    [{'blockname': '/a/b/c#123-qwe',
      'deleted': 0,
      'name': 'WorkflowName'},
    {'blockname': '/a/b/c#456-rty',
      'deleted': 1,
      'name': 'WorkflowName'},
     {'blockname': '/a/b/d#123-asd',
      'deleted': 0,
      'name': 'WorkflowName'}
    ...
    ]
    NOTE:
     * The number of records per workflow and block returned (i.e. number of records per group in the GROUP BY statement)
       from the query is not related to either the number of blocks nor to the number of workflows, but rather to the
       combination of number of files in the block and some other factor which increases the granularity (it seems to be
       the number of records in dbsbuffer_workflow table per file aggregated by workflow), and NO `DISTINCT` requirement
       in the SELECT statement is needed because we already have them properly grouped.
     * Once deleted we should NOT expect duplicate records with two different values of the deleted
       flag to be returned for a single block but we should still create the list of deleted and
       NotDeleted blocks as sets and eventually create their proper intersection for double check.
    This list needs to be further aggregated by name to produce an aggregated structure per workflow like:
    [{'name': 'WorkflowName'
      'blocksNotDeleted': ['/a/b/c#123-qwe',
                           /a/b/c#456-rty']
      'blocksDeleted': ['/a/b/d#123-asd']
     },
    ...
    ]
    :param result: The result as returned by the mysql query execution.
    :return:       List of dictionaries
    """
    # First reformat the output in a list of dictionaries per DB record
    dictResults = DBFormatter.formatDict(self, result)
    # Now aggregate all blocks per workflow:
    results = {}
    for record in dictResults:
        wfName = record['name']
        results.setdefault(wfName, {'name': wfName, 'blocksDeleted': [], 'blocksNotDeleted': []})
        if record['deleted']:
            results[wfName]['blocksDeleted'].append(record['blockname'])
        else:
            results[wfName]['blocksNotDeleted'].append(record['blockname'])
    return results.values()