<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def set_ptr(self, ptr):
        # type: (path_table_record.PathTableRecord) -> None
        '''
        A method to set the Path Table Record associated with this Directory
        Record.

        Parameters:
         ptr - The path table record to associate with this Directory Record.
        Returns:
         Nothing.
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Directory Record not yet initialized')

        self.ptr = ptr