Human: networkx graph filter degree. Assistant: 
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.