def METHOD_NAME(obj_to_remove: MeshObject, obj_to_add: MeshObject,
            check_collision_with: Optional[List[MeshObject]] = None, scale: bool = True,
            relative_pose_sampler: Callable[[MeshObject], None] = None):
    """ Scale, translate, rotate obj_to_add to match obj_to_remove and check if there is a bounding box collision
    returns a boolean.
    :param obj_to_remove: An object to remove from the scene.
    :param obj_to_add: An object to put in the scene instead of obj_to_remove.
    :param check_collision_with: A list of objects, which are not checked for collisions with.
    :param scale: Scales obj_to_add to match obj_to_remove dimensions.
    :param relative_pose_sampler: A function that randomly perturbs the pose of the object to replace with
                                  (after it has been aligned to the object to replace).
    """
    if check_collision_with is None:
        check_collision_with = []
    # New object takes location, rotation and rough scale of original object
    obj_to_add.set_location(obj_to_remove.get_location())
    obj_to_add.set_rotation_euler(obj_to_remove.get_rotation_euler())
    if scale:
        obj_to_add.set_scale(_ObjectReplacer.bb_ratio(obj_to_remove.get_bound_box(True),
                                                      obj_to_add.get_bound_box(True)))
    if relative_pose_sampler is not None:
        relative_pose_sampler(obj_to_add)
    # Check for collision between the new object and other objects in the scene
    objects_to_check_against = [obj for obj in check_collision_with if obj not in (obj_to_add, obj_to_remove)]
    return CollisionUtility.check_intersections(obj_to_add, None, objects_to_check_against, [])