Fetch the local nodes (-c local) that contain collectl files from
       the bcbio log file.

       :returns: A list with unique (non-FQDN) local hostnames
                 where collectl raw logs can be found.

def get_bcbio_nodes(path):
    """Fetch the local nodes (-c local) that contain collectl files from
       the bcbio log file.

       :returns: A list with unique (non-FQDN) local hostnames
                 where collectl raw logs can be found.
    """
    with open(path, 'r') as file_handle:
        hosts = collections.defaultdict(dict)
        for line in file_handle:
            matches = re.search(r'\]\s([^:]+):', line)
            if not matches:
                continue
            # Format of the record will be "[Date] host: Timing: Step" if distributed,
            # otherwise the host will be missing and it means its a local run, we can stop
            elif 'Timing: ' in line and line.split(': ')[1] != 'Timing':
                hosts = collections.defaultdict(dict, {socket.gethostname() : {}})
                break

            hosts[matches.group(1)]

    return hosts