code: def draw_lines(start, total_duration, minute_scale, scale):
      """
      Function to draw the minute line markers and timestamps
  
      Parameters
      ----------
      start : datetime.datetime obj
          start time for first minute line marker
      total_duration : float
          total duration of the workflow execution (in seconds)
      minute_scale : integer
          the scale, in minutes, at which to plot line markers for the
          gantt chart; for example, minute_scale=10 means there are lines
          drawn at every 10 minute interval from start to finish
      scale : integer
          scale factor in pixel spacing between minute line markers
  
      Returns
      -------
      result : string
          the html-formatted string for producing the minutes-based
          time line markers
      """
  
      # Init variables
      result = ""
      next_line = 220
      next_time = start
      num_lines = int(((total_duration // 60) // minute_scale) + 2)
  
      # Iterate through the lines and create html line markers string
      for line in range(num_lines):
          # Line object
          new_line = (
              "<hr class='line' width='98%%' style='top:%dpx;'>"
              % next_line
          )
          result += new_line
          # Time digits
          time = "<p class='time' style='top:%dpx;'> %02d:%02d </p>" % (
              next_line - 20,
              next_time.hour,
              next_time.minute,
          )
          result += time
          # Increment line spacing and digits
          next_line += minute_scale * scale
          next_time += datetime.timedelta(minutes=minute_scale)
  
      # Return html string for time line markers
      return result
  
file_path: nipype/nipype/utils/draw_gantt_chart.py
imports: import sys
  import random
  import datetime
  import simplejson
  from collections import OrderedDict
label_desc: Use image node_id 4 for calling a global function with example usage: draw_lines(start, total_duration, minute_scale, scale) and returns: result