code: def create(graph, verbose=True):
      """
      Compute the in degree, out degree and total degree of each vertex.
  
      Parameters
      ----------
      graph : SGraph
          The graph on which to compute degree counts.
  
      verbose : bool, optional
          If True, print progress updates.
  
      Returns
      -------
      out : DegreeCountingModel
  
      Examples
      --------
      If given an :class:`~turicreate.SGraph` ``g``, we can create
      a :class:`~turicreate.degree_counting.DegreeCountingModel` as follows:
  
      >>> g = turicreate.load_sgraph('http://snap.stanford.edu/data/web-Google.txt.gz',
      ...                         format='snap')
      >>> m = turicreate.degree_counting.create(g)
      >>> g2 = m['graph']
      >>> g2
      SGraph({'num_edges': 5105039, 'num_vertices': 875713})
      Vertex Fields:['__id', 'in_degree', 'out_degree', 'total_degree']
      Edge Fields:['__src_id', '__dst_id']
  
      >>> g2.vertices.head(5)
      Columns:
          __id	int
          in_degree	int
          out_degree	int
          total_degree	int
      <BLANKLINE>
      Rows: 5
      <BLANKLINE>
      Data:
      +------+-----------+------------+--------------+
      | __id | in_degree | out_degree | total_degree |
      +------+-----------+------------+--------------+
      |  5   |     15    |     7      |      22      |
      |  7   |     3     |     16     |      19      |
      |  8   |     1     |     2      |      3       |
      |  10  |     13    |     11     |      24      |
      |  27  |     19    |     16     |      35      |
      +------+-----------+------------+--------------+
  
      See Also
      --------
      DegreeCountingModel
      """
      from turicreate._cython.cy_server import QuietProgress
  
      if not isinstance(graph, _SGraph):
          raise TypeError('"graph" input must be a SGraph object.')
  
      with QuietProgress(verbose):
          params = _tc.extensions._toolkits.graph.degree_count.create(
              {"graph": graph.__proxy__}
          )
      return DegreeCountingModel(params["model"])
  
file_path: turicreate/src/python/turicreate/toolkits/graph_analytics/degree_counting.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  from turicreate.data_structures.sgraph import SGraph
  from turicreate.toolkits.graph_analytics._model_base import GraphAnalyticsModel
label_desc: Use image node_id 1 for calling a global function with example usage: create(graph, verbose) and returns: DegreeCountingModel