Is it possible to tetrahedral a mesh in Blender?
In your code, you should replace:

faces = [bm.faces] by faces = bm.faces[:] because you want an array of face, not an array with one array of faces.

geom = f by geom = [f] in consequence


Though, using bmesh.ops too many times will lead to poor performance.
You can extrude all in one operation and loop over the result for just shifting the coordinates:
import bpy
import bmesh
from mathutils import Vector
from bmesh.types import BMVert 

# The mesh and its related object
obj = bpy.context.active_object
me = obj.data

# Access to BMesh data and ensure lookup tables
bm = bmesh.new()
bm.from_mesh(me)

# Geometry to extrude
bm.faces.ensure_lookup_table()
faces = bm.faces[:]

# Extrude once
result = bmesh.ops.extrude_discrete_faces(bm, faces = faces)

for face in result[&quot;faces&quot;]:
    up = face.normal
    #Shift the vertices without bmesh.ops
    for v in face.verts:
        v.co += up

bm.to_mesh(me)
me.update()

Which gives: