code: def simulated_brick(face_count, extents, noise, max_iter=10):
      
  
      # create the mesh as a simple box
      mesh = trimesh.creation.box(extents=extents)
  
      # add some systematic error pre- tesselation
      mesh.vertices[0] += mesh.vertex_normals[0] + (noise * 2)
  
      # subdivide until we have more faces than we want
      for i in range(max_iter):
          if len(mesh.vertices) > face_count:
              break
          mesh = mesh.subdivide()
  
      # apply tesselation and random noise
      mesh = mesh.permutate.noise(noise)
  
      # randomly rotation with translation
      transform = trimesh.transformations.random_rotation_matrix()
      transform[:3, 3] = (np.random.random(3) - .5) * 1000
  
      mesh.apply_transform(transform)
  
      return mesh
docs: Produce a mesh that is a rectangular solid with noise
      with a random transform.
  
      Parameters
      -------------
      face_count : int
        Approximate number of faces desired
      extents : (n,3) float
        Dimensions of brick
      noise : float
        Magnitude of vertex noise to apply