code: def RoundToSeconds(cls, timestamp):
      
      leftovers = timestamp % definitions.MICROSECONDS_PER_SECOND
      scrubbed = timestamp - leftovers
      rounded = round(float(leftovers) / definitions.MICROSECONDS_PER_SECOND)
  
      return int(scrubbed + rounded * definitions.MICROSECONDS_PER_SECOND)
docs: Takes a timestamp value and rounds it to a second precision.