def __init__(self, time_elements_tuple=None):
super(TimeElements, self).__init__()<EOL>self._number_of_seconds = None<EOL>self._precision = definitions.PRECISION_1_SECOND<EOL>self._time_elements_tuple = time_elements_tuple<EOL>if time_elements_tuple:<EOL><INDENT>if len(time_elements_tuple) < <NUM_LIT:6>:<EOL><INDENT>raise ValueError((<EOL>'<STR_LIT>'<EOL>'<STR_LIT>').format(len(time_elements_tuple)))<EOL><DEDENT>self._number_of_seconds = self._GetNumberOfSecondsFromElements(<EOL>*time_elements_tuple)<EOL><DEDENT>
Initializes time elements.

        Args:
          time_elements_tuple (Optional[tuple[int, int, int, int, int, int]]):
              time elements, contains year, month, day of month, hours, minutes and
              seconds.

        Raises:
          ValueError: if the time elements tuple is invalid.