code: def delete_all(obj):
      '''Calls `delete()` on all members of `obj` that are recognized as
      instances of `pg` objects.'''
      types = tuple([
          Shader,
          Mesh,
          VertexBuffer,
          IndexBuffer,
          Texture,
          Program,
          Context,
      ])
      for name in dir(obj):
          child = getattr(obj, name)
          if isinstance(child, types):
              child.delete(f delete_all(obj):
      '''Calls `delete()` on all members of `obj` that are recognized as
      instances of `pg` objects.'''
      types = tuple([
          Shader,
          Mesh,
          VertexBuffer,
          IndexBuffer,
          Texture,
          Program,
          Context,
      ])
      for name in dir(obj):
          child = getattr(obj, name)
          if isinstance(child, types):
              child.delete()
docs: Calls `delete()` on all members of `obj` that are recognized as
      instances of `pg` objects.