code: def get_bcbio_timings(path):
      
      with open(path, 'r') as file_handle:
          steps = {}
          for line in file_handle:
              matches = re.search(r'^\[([^\]]+)\] ([^:]+: .*)', line)
              if not matches:
                  continue
  
              tstamp = matches.group(1)
              msg = matches.group(2)
  
              # XXX: new special logs do not have this
              #if not msg.find('Timing: ') >= 0:
              #    continue
  
              when = datetime.strptime(tstamp, '%Y-%m-%dT%H:%MZ').replace(
                  tzinfo=pytz.timezone('UTC'))
  
              step = msg.split(":")[-1].strip()
              steps[when] = step
  
          return steps
docs: Fetch timing information from a bcbio log file.