code: def remove_child(self, child, index, logical_block_size):
          '''
          A method to remove a child from this Directory Record.
          Parameters:
           child - The child DirectoryRecord object to remove.
           index - The index of the child into this DirectoryRecord children list.
           logical_block_size - The size of a logical block on this volume descriptor.
          Returns:
           True if removing this child caused an underflow, False otherwise.
          '''
          if not self._initialized:
              raise pycdlibexception.PyCdlibInternalError('Directory Record not yet initialized')
          if index < 0:
              raise pycdlibexception.PyCdlibInternalError('Invalid child index to remove')
          if child.rock_ridge is not None:
              if child.isdir or child.rock_ridge.child_link_record_exists():
                  if len(self.children) < 2:
                      raise pycdlibexception.PyCdlibInvalidISO('Expected a dot and dotdot entry, but missing; ISO is corrupt')
                  if self.children[0].rock_ridge is None or self.children[1].rock_ridge is None:
                      raise pycdlibexception.PyCdlibInvalidISO('Missing Rock Ridge entry on dot or dotdot; ISO is corrupt')
                  if self.parent is None:
                      self.children[0].rock_ridge.remove_from_file_links()
                      self.children[1].rock_ridge.remove_from_file_links()
                  else:
                      if self.rock_ridge is None:
                          raise pycdlibexception.PyCdlibInvalidISO('Child has Rock Ridge, but parent does not; ISO is corrupt')
                      self.rock_ridge.remove_from_file_links()
                      self.children[0].rock_ridge.remove_from_file_links()
          del self.children[index]
          num_extents, dirrecord_offset = self._recalculate_extents_and_offsets(index,
                                                                                logical_block_size)
          underflow = False
          total_size = (num_extents - 1) * logical_block_size + dirrecord_offset
          if (self.data_length - total_size) > logical_block_size:
              self.data_length -= logical_block_size
              self.children[0].data_length = self.data_length
              if self.parent is None:
                  self.children[1].data_length = self.data_length
              for c in self.children:
                  if not c.is_dir():
                      continue
                  if len(c.children) > 1:
                      c.children[1].data_length = self.data_length
              underflow = True
          return underflow