code: def pipeline_counter(self):
          
          if 'pipeline_counter' in self.data:
              return self.data.get('pipeline_counter')
          elif self.pipeline is not None:
              return self.pipeline.data.counter
docs: Get pipeline counter of current stage instance.
  
          Because instantiating stage instance could be performed in different ways and those return different results,
          we have to check where from to get counter of the pipeline.
  
          :return: pipeline counter.