def METHOD_NAME(device_mesh_info: DeviceMeshInfo):
    '''
    This method is used to initialize the device mesh.
    Args:
        device_mesh_info (DeviceMeshInfo): The information used to initialize device mesh.
    '''
    # parse the device mesh info
    physical_devices = device_mesh_info.physical_ids
    physical_mesh = torch.tensor(physical_devices)
    logical_mesh_shape = device_mesh_info.mesh_shape
    if logical_mesh_shape is None:
        ab_profiler = AlphaBetaProfiler(physical_devices)
        # search for the best logical mesh shape
        logical_mesh_id = ab_profiler.search_best_logical_mesh()
        logical_mesh_id = torch.Tensor(logical_mesh_id).to(torch.int)
    else:
        logical_mesh_id = physical_mesh.reshape(logical_mesh_shape)
    device_mesh = DeviceMesh(physical_mesh_id=physical_mesh, logical_mesh_id=logical_mesh_id, init_process_group=True)
    return device_mesh