code: def resize_bytes(fobj, old_size, new_size, offset):
      
  
      if new_size < old_size:
          delete_size = old_size - new_size
          delete_at = offset + new_size
          delete_bytes(fobj, delete_size, delete_at)
      elif new_size > old_size:
          insert_size = new_size - old_size
          insert_at = offset + old_size
          insert_bytes(fobj, insert_size, insert_at)
docs: Resize an area in a file adding and deleting at the end of it.
      Does nothing if no resizing is needed.
  
      Args:
          fobj (fileobj)
          old_size (int): The area starting at offset
          new_size (int): The new size of the area
          offset (int): The start of the area
      Raises:
          IOError