<human>:  Can you show me a Python function to networkx graph filter degree.
<bot>: Here is a Python function to networkx graph filter degree

import networkx as nx

def degree(G):
  """Returns the degree of a graph.

  :param networkx.classes.graph.Graph G:
  :rtype: int
  :return:
  """
  return len(G.degree())

# Enter the graph
G = nx.Graph()

# Calling the function
print((degree(G)))

#Example Output
# 0

#Remember to inspect code for bugs.