code: def rddToFileName(prefix, suffix, timestamp):
      
      if isinstance(timestamp, datetime):
          seconds = time.mktime(timestamp.timetuple())
          timestamp = int(seconds * 1000) + timestamp.microsecond // 1000
      if suffix is None:
          return prefix + "-" + str(timestamp)
      else:
          return prefix + "-" + str(timestamp) + "." + suffix
docs: Return string prefix-time(.suffix)
  
      >>> rddToFileName("spark", None, 12345678910)
      'spark-12345678910'
      >>> rddToFileName("spark", "tmp", 12345678910)
      'spark-12345678910.tmp'