code: def ms_to_str(ms, fractions=False):
      
      sgn = "-" if ms < 0 else ""
      h, m, s, ms = ms_to_times(abs(ms))
      if fractions:
          return sgn + "{:01d}:{:02d}:{:02d}.{:03d}".format(h, m, s, ms)
      else:
          return sgn + "{:01d}:{:02d}:{:02d}".format(h, m, s)
docs: Prettyprint milliseconds to [-]H:MM:SS[.mmm]
      
      Handles huge and/or negative times. Non-negative times with ``fractions=True``
      are matched by :data:`pysubs2.time.TIMESTAMP`.
      
      Arguments:
          ms: Number of milliseconds (int, float or other numeric class).
          fractions: Whether to print up to millisecond precision.
      
      Returns:
          str