def METHOD_NAME(mesh, oriented=True, scale=1.0):
    """
    Create a box element.
    """
    assert not oriented or isinstance(mesh, trimesh.Trimesh)
    # [TODO v2.1.0] Fix creation for Trimesh
    if type(scale) in [int, float]:
        scale = [scale] * 3
    if isinstance(mesh, trimesh.Trimesh) or isinstance(mesh, trimesh.Scene):
        # scale the mesh
        mesh = deepcopy(mesh)
        mesh.apply_transform(np.diag(scale + [1]))
        if oriented:
            extent = mesh.bounding_box_oriented.extents
            transform = mesh.bounding_box_oriented.primitive.transform
        else:
            extent = mesh.bounding_box.extents
            transform = mesh.bounding_box.primitive.transform
    elif BPY_AVAILABLE and isinstance(mesh, bpy.types.Object):
        bound_box = np.array(mesh.bound_box) * np.array(scale)
        extent = (np.max(bound_box, axis=0) - np.min(bound_box, axis=0))
        transform = np.identity(4)
        transform[0:3, 3] = np.average(bound_box, axis=0)
        # transform = np.array(mesh.matrix_local).dot(transform)
    else:
        raise ValueError(f"Received {type(mesh)}")
    return representation.Box(size=extent), transform