code: def parse_clusterflow_logs(self, f):
          
          module = None
          job_id = None
          pipeline_id = None
          for l in f['f']:
  
              # Get pipeline ID
              module_r = re.match(r'Module:\s+(.+)$', l)
              if module_r:
                  module = module_r.group(1)
              job_id_r = re.match(r'Job ID:\s+(.+)$', l)
              if job_id_r:
                  job_id = job_id_r.group(1)
                  if module is not None:
                      pipeline_r = re.match(r"(cf_.+)_"+re.escape(module)+r"_\d+$", job_id)
                      if pipeline_r:
                          pipeline_id = pipeline_r.group(1)
  
              # Get commands that have been run
              if l.startswith('###CFCMD'):
                  if pipeline_id is None:
                      pipeline_id = 'unknown'
                  if pipeline_id not in self.clusterflow_commands.keys():
                      self.clusterflow_commands[pipeline_id] = list()
                  self.clusterflow_commands[pipeline_id].append(l[8:])
docs: Parse Clusterflow logs