code: def turan_graph(n, r):
      if not 1 <= r <= n:
          raise nx.NetworkXError("Must satisfy 1 <= r <= n")
      n_div_r, n_mod_r = divmod(n, r)
      partitions = [n_div_r] * (r - n_mod_r) + [n_div_r + 1] * n_mod_r
      return complete_multipartite_graph(*partitions)
  
imports: import itertools
  from numbers import Integral
  import cupy
  import networkx
  import numpy
  import nx_cugraph
  from ..utils import _get_int_dtype, index_dtype, networkx_algorithm
  from ._utils import _IS_NX32_OR_LESS, _common_small_graph, _complete_graph_indices, _create_using_class, _ensure_int, _ensure_nonnegative_int, _number_and_nodes
label_desc: Use image node_id 15 for calling a global function with example usage: turan_graph(n, r) and returns: complete_multipartite_graph