code: def frames_to_tc(self, frames):
          
  
          if frames == 0:
              return 0, 0, 0, 0
  
          ffps = float(self._framerate)
  
          if self.drop_frame:
              # Number of frames to drop on the minute marks is the nearest
              # integer to 6% of the framerate
              drop_frames = int(round(ffps * .066666))
          else:
              drop_frames = 0
  
          # Number of frames in an hour
          frames_per_hour = int(round(ffps * 60 * 60))
          # Number of frames in a day - timecode rolls over after 24 hours
          frames_per_24_hours = frames_per_hour * 24
          # Number of frames per ten minutes
          frames_per_10_minutes = int(round(ffps * 60 * 10))
          # Number of frames per minute is the round of the framerate * 60 minus
          # the number of dropped frames
          frames_per_minute = int(round(ffps)*60) - drop_frames
  
          frame_number = frames - 1
  
          if frame_number < 0:
              # Negative time. Add 24 hours.
              frame_number += frames_per_24_hours
  
          # If frame_number is greater than 24 hrs, next operation will rollover
          # clock
          frame_number %= frames_per_24_hours
  
          if self.drop_frame:
              d = frame_number // frames_per_10_minutes
              m = frame_number % frames_per_10_minutes
              if m > drop_frames:
                  frame_number += (drop_frames * 9 * d) + \
                      drop_frames * ((m - drop_frames) // frames_per_minute)
              else:
                  frame_number += drop_frames * 9 * d
  
          ifps = self._int_framerate
          frs = frame_number % ifps
          secs = (frame_number // ifps) % 60
          mins = ((frame_number // ifps) // 60) % 60
          hrs = (((frame_number // ifps) // 60) // 60)
  
          return hrs, mins, secs, frs
docs: Converts frames back to timecode
  
          :returns str: the string representation of the current time code