<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self, i, value):
 """Write value in ith position in file. Keyword arguments: i -- position in file value -- value to be packed (tuple) """

        # Current byte position - (n * data_size)
        offset = i * self.__strct.size

        # Set file pointer to -(#data)
        self.__file.seek(offset)

        # Pack value
        data = self.pack(value)

        # Write packed value
        self.__file.write(data)