user: Show practical ways to work with Operator Example in a Blender add-on or script – include code.

assistant: for subdividing edges
    with options for face patterns, smoothing and randomization.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **edges** (list of (`bmesh.types.BMEdge`)) – Input edges.
        - **smooth** (*float*) – Smoothness factor.
        - **smooth_falloff** (*enum in* *[**'SMOOTH'**,* *'SPHERE'**,* *'ROOT'**,* *'SHARP'**,* *'LINEAR'**,* *'INVERSE_SQUARE'**]**,* *default 'SMOOTH'*) – Smooth falloff type.
        - **fractal** (*float*) – Fractal randomness factor.
        - **along_normal** (*float*) – Apply fractal displacement along normal only.
        - **cuts** (*int*) – Number of cuts.
        - **seed** (*int*) – Seed for the random number generator.
        - **custom_patterns** (*dict mapping vert/edge/face types to unknown internal data**,* *not compatible with Python*) – Uses custom pointers.
        - **edge_percents** (*dict mapping vert/edge/face types to float*) – Undocumented.
        - **quad_corner_type** (*enum in* *[**'STRAIGHT_CUT'**,* *'INNER_VERT'**,* *'PATH'**,* *'FAN'**]**,* *default 'STRAIGHT_CUT'*) – Quad corner type.
        - **use_grid_fill** (*bool*) – Fill in fully-selected faces with a grid.
        - **use_single_edge** (*bool*) – Tessellate the case of one edge selected in a quad or triangle.
        - **use_only_quads** (*bool*) – Only subdivide quads (for loop-cut).
        - **use_sphere** (*bool*) – For making new primitives only.
        - **use_smooth_even** (*bool*) – Maintain even offset when smoothing.

    Returns:
    :   - `geom_inner`:

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
        - `geom_split`:

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
        - `geom`:
          Contains all output geometry.

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)

    Return type:
    :   dict[str, Any]

bmesh.ops.subdivide_edgering(*bm*, *edges=[]*, *interp_mode='LINEAR'*, *smooth=0*, *cuts=0*, *profile_shape='SMOOTH'*, *profile_shape_factor=0*)
:   Subdivide Edge-Ring.

    Take an edge-ring, and subdivide with interpolation options.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **edges** (list of (`bmesh.types.BMEdge`)) – Input vertices.
        - **interp_mode** (*enum in* *[**'LINEAR'**,* *'PATH'**,* *'SURFACE'**]**,* *default 'LINEAR'*) – Interpolation method.
        - **smooth** (*float*) – Smoothness factor.
        - **cuts** (*int*) – Number of cuts.
        - **profile_shape** (*enum in* *[**'SMOOTH'**,* *'SPHERE'**,* *'ROOT'**,* *'SHARP'**,* *'LINEAR'**,* *'INVERSE_SQUARE'**]**,* *default 'SMOOTH'*) – Profile shape type.
        - **profile_shape_factor** (*float*) – How much intermediary new edges are shrunk/expanded.

    Returns:
    :   - `faces`:
          Output faces.

          **type** list of (`bmesh.types.BMFace`)

    Return type:
    :   dict[str, Any]

bmesh.ops.bisect_plane(*bm*, *geom=[]*, *dist=0*, *plane_co=mathutils.Vector()*, *plane_no=mathutils.Vector()*, *use_snap_center=False*, *clear_outer=False*, *clear_inner=False*)
:   Bisect Plane.

    Bisects the mesh by a plane (cut the mesh in half).

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **geom** (list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)) – Input geometry.
        - **dist** (*float*) – Minimum distance when testing if a vert is exactly on the plane.
        - **plane_co** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") or any sequence of 3 floats) – Point on the plane.
        - **plane_no** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") or any sequence of 3 floats) – Direction of the plane.
        - **use_snap_center** (*bool*) – Snap axis aligned verts to the center.
        - **clear_outer** (*bool*) – When enabled. remove all geometry on the positive side of the plane.
        - **clear_inner** (*bool*) – When enabled. remove all geometry on the negative side of the plane.

    Returns:
    :   - `geom_cut`:
          Output geometry aligned with the plane (new and existing).

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`)
        - `geom`:
          Input and output geometry (result of cut).

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)

    Return type:
    :   dict[str, Any]

bmesh.ops.delete(*bm*, *geom=[]*, *context='VERTS'*)
:   Delete Geometry.

    Utility operator to delete geometry.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **geom** (list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)) – Input geometry.
        - **context** (*enum in* *[**'VERTS'**,* *'EDGES'**,* *'FACES_ONLY'**,* *'EDGES_FACES'**,* *'FACES'**,* *'FACES_KEEP_BOUNDARY'**,* *'TAGGED_ONLY'**]**,* *default 'VERTS'*) – Geometry types to delete.

bmesh.ops.duplicate(*bm*, *geom=[]*, *dest=None*, *use_select_history=False*, *use_edge_flip_from_face=False*)
:   Duplicate Geometry.

    Utility operator to duplicate geometry,
    optionally into a destination mesh.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **geom** (list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)) – Input geometry.
        - **dest** (`bmesh.types.BMesh`) – Destination bmesh, if None will use current on.
        - **use_select_history** (*bool*) – Undocumented.
        - **use_edge_flip_from_face** (*bool*) – Undocumented.

    Returns:
    :   - `geom_orig`:

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
        - `geom`:

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
        - `vert_map`:

          **type** dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
        - `edge_map`:

          **type** dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
        - `face_map`:

          **type** dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
        - `boundary_map`:
          Boundary edges from the split geometry that maps edges from the original geometry
          to the destination edges.

          **type** dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
        - `isovert_map`:

          **type** dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`

    Return type:
    :   dict[str, Any]

bmesh.ops.split(*bm*, *geom=[]*, *dest=None*, *use_only_faces=False*)
:   Split Off Geometry.

    Disconnect geometry from adjacent edges and faces,
    optionally into a destination mesh.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **geom** (list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)) – Input geometry.
        - **dest** (`bmesh.types.BMesh`) – Destination bmesh, if None will use current one.
        - **use_only_faces** (*bool*) – When enabled. don’t duplicate loose verts/edges.

    Returns:
    :   - `geom`:

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)
        - `boundary_map`:
          Boundary edges from the split geometry that maps edges from the original geometry
          to the destination edges.

          When the source edges have been deleted, the destination edge will be used
          for both the key and the value.

          **type** dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`
        - `isovert_map`:

          **type** dict mapping vert/edge/face types to `bmesh.types.BMVert`/`bmesh.types.BMEdge`/`bmesh.types.BMFace`

    Return type:
    :   dict[str, Any]

bmesh.ops.spin(*bm*, *geom=[]*, *cent=mathutils.Vector()*, *axis=mathutils.Vector()*, *dvec=mathutils.Vector()*, *angle=0*, *space=mathutils.Matrix.Identity(4)*, *steps=0*, *use_merge=False*, *use_normal_flip=False*, *use_duplicate=False*)
:   Spin.

    Extrude or duplicate geometry a number of times,
    rotating and possibly translating after each step

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **geom** (list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)) – Input geometry.
        - **cent** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") or any sequence of 3 floats) – Rotation center.
        - **axis** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") or any sequence of 3 floats) – Rotation axis.
        - **dvec** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") or any sequence of 3 floats) – Translation delta per step.
        - **angle** (*float*) – Total rotation angle (radians).
        - **space** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to define the space (typically object matrix).
        - **steps** (*int*) – Number of steps.
        - **use_merge** (*bool*) – Merge first/last when the angle is a full revolution.
        - **use_normal_flip** (*bool*) – Create faces with reversed direction.
        - **use_duplicate** (*bool*) – Duplicate or extrude?.

    Returns:
    :   - `geom_last`:
          Result of last step.

          **type** list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)

    Return type:
    :   dict[str, Any]

bmesh.ops.rotate_uvs(*bm*, *faces=[]*, *use_ccw=False*)
:   UV Rotation.

    Cycle the loop UVs

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **faces** (list of (`bmesh.types.BMFace`)) – Input faces.
        - **use_ccw** (*bool*) – Rotate counter-clockwise if true, otherwise clockwise.

bmesh.ops.reverse_uvs(*bm*, *faces=[]*)
:   UV Reverse.

    Reverse the UVs

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **faces** (list of (`bmesh.types.BMFace`)) – Input faces.

bmesh.ops.rotate_colors(*bm*, *faces=[]*, *use_ccw=False*, *color_index=0*)
:   Color Rotation.

    Cycle the loop colors

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **faces** (list of (`bmesh.types.BMFace`)) – Input faces.
        - **use_ccw** (*bool*) – Rotate counter-clockwise if true, otherwise clockwise.
        - **color_index** (*int*) – Index into color attribute list.

bmesh.ops.reverse_colors(*bm*, *faces=[]*, *color_index=0*)
:   Color Reverse

    Reverse the loop colors.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **faces** (list of (`bmesh.types.BMFace`)) – Input faces.
        - **color_index** (*int*) – Index into color attribute list.

bmesh.ops.split_edges(*bm*, *edges=[]*, *verts=[]*, *use_verts=False*)
:   Edge Split.

    Disconnects faces along input edges.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **edges** (list of (`bmesh.types.BMEdge`)) – Input edges.
        - **verts** (list of (`bmesh.types.BMVert`)) – Optional tag verts, use to have greater control of splits.
        - **use_verts** (*bool*) – Use ‘verts’ for splitting, else just find verts to split from edges.

    Returns:
    :   - `edges`:
          Old output disconnected edges.

          **type** list of (`bmesh.types.BMEdge`)

    Return type:
    :   dict[str, Any]

bmesh.ops.create_grid(*bm*, *x_segments=0*, *y_segments=0*, *size=0*, *matrix=mathutils.Matrix.Identity(4)*, *calc_uvs=False*)
:   Create Grid.

    Creates a grid with a variable number of subdivisions

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **x_segments** (*int*) – Number of x segments.
        - **y_segments** (*int*) – Number of y segments.
        - **size** (*float*) – Size of the grid.
        - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to multiply the new geometry with.
        - **calc_uvs** (*bool*) – Calculate default UVs.

    Returns:
    :   - `verts`:
          Output verts.

          **type** list of (`bmesh.types.BMVert`)

    Return type:
    :   dict[str, Any]

bmesh.ops.create_uvsphere(*bm*, *u_segments=0*, *v_segments=0*, *radius=0*, *matrix=mathutils.Matrix.Identity(4)*, *calc_uvs=False*)
:   Create UV Sphere.

    Creates a grid with a variable number of subdivisions

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **u_segments** (*int*) – Number of u segments.
        - **v_segments** (*int*) – Number of v segment.
        - **radius** (*float*) – Radius.
        - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to multiply the new geometry with.
        - **calc_uvs** (*bool*) – Calculate default UVs.

    Returns:
    :   - `verts`:
          Output verts.

          **type** list of (`bmesh.types.BMVert`)

    Return type:
    :   dict[str, Any]

bmesh.ops.create_icosphere(*bm*, *subdivisions=0*, *radius=0*, *matrix=mathutils.Matrix.Identity(4)*, *calc_uvs=False*)
:   Create Ico-Sphere.

    Creates a grid with a variable number of subdivisions

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **subdivisions** (*int*) – How many times to recursively subdivide the sphere.
        - **radius** (*float*) – Radius.
        - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to multiply the new geometry with.
        - **calc_uvs** (*bool*) – Calculate default UVs.

    Returns:
    :   - `verts`:
          Output verts.

          **type** list of (`bmesh.types.BMVert`)

    Return type:
    :   dict[str, Any]

bmesh.ops.create_monkey(*bm*, *matrix=mathutils.Matrix.Identity(4)*, *calc_uvs=False*)
:   Create Suzanne.

    Creates a monkey (standard blender primitive).

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to multiply the new geometry with.
        - **calc_uvs** (*bool*) – Calculate default UVs.

    Returns:
    :   - `verts`:
          Output verts.

          **type** list of (`bmesh.types.BMVert`)

    Return type:
    :   dict[str, Any]

bmesh.ops.create_cone(*bm*, *cap_ends=False*, *cap_tris=False*, *segments=0*, *radius1=0*, *radius2=0*, *depth=0*, *matrix=mathutils.Matrix.Identity(4)*, *calc_uvs=False*)
:   Create Cone.

    Creates a cone with variable depth at both ends

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **cap_ends** (*bool*) – Whether or not to fill in the ends with faces.
        - **cap_tris** (*bool*) – Fill ends with triangles instead of ngons.
        - **segments** (*int*) – Number of vertices in the base circle.
        - **radius1** (*float*) – Radius of one end.
        - **radius2** (*float*) – Radius of the opposite.
        - **depth** (*float*) – Distance between ends.
        - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to multiply the new geometry with.
        - **calc_uvs** (*bool*) – Calculate default UVs.

    Returns:
    :   - `verts`:
          Output verts.

          **type** list of (`bmesh.types.BMVert`)

    Return type:
    :   dict[str, Any]

bmesh.ops.create_circle(*bm*, *cap_ends=False*, *cap_tris=False*, *segments=0*, *radius=0*, *matrix=mathutils.Matrix.Identity(4)*, *calc_uvs=False*)
:   Creates a Circle.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **cap_ends** (*bool*) – Whether or not to fill in the ends with faces.
        - **cap_tris** (*bool*) – Fill ends with triangles instead of ngons.
        - **segments** (*int*) – Number of vertices in the circle.
        - **radius** (*float*) – Radius of the circle.
        - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to multiply the new geometry with.
        - **calc_uvs** (*bool*) – Calculate default UVs.

    Returns:
    :   - `verts`:
          Output verts.

          **type** list of (`bmesh.types.BMVert`)

    Return type:
    :   dict[str, Any]

bmesh.ops.create_cube(*bm*, *size=0*, *matrix=mathutils.Matrix.Identity(4)*, *calc_uvs=False*)
:   Create Cube

    Creates a cube.

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **size** (*float*) – Size of the cube.
        - **matrix** ([`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix")) – Matrix to multiply the new geometry with.
        - **calc_uvs** (*bool*) – Calculate default UVs.

    Returns:
    :   - `verts`:
          Output verts.

          **type** list of (`bmesh.types.BMVert`)

    Return type:
    :   dict[str, Any]

bmesh.ops.bevel(*bm*, *geom=[]*, *offset=0*, *offset_type='OFFSET'*, *profile_type='SUPERELLIPSE'*, *segments=0*, *profile=0*, *affect='VERTICES'*, *clamp_overlap=False*, *material=0*, *loop_slide=False*, *mark_seam=False*, *mark_sharp=False*, *harden_normals=False*, *face_strength_mode='NONE'*, *miter_outer='SHARP'*, *miter_inner='SHARP'*, *spread=0*, *custom_profile=None*, *vmesh_method='ADJ'*)
:   Bevel.

    Bevels edges and vertices

    Parameters:
    :   - **bm** (`bmesh.types.BMesh`) – The bmesh to operate on.
        - **geom** (list of (`bmesh.types.BMVert`, `bmesh.types.BMEdge`, `bmesh.types.BMFace`)) – Input edges and vertices.
        - **offset** (*float*) – Amount to offset beveled ed