code: def test_k_core_invalid_input():
      karate = UNDIRECTED_DATASETS[0]
      G = karate.get_graph(create_using=cugraph.Graph(directed=True))
      with pytest.raises(ValueError):
          cugraph.k_core(G)
  
      G = karate.get_graph()
      degree_type = "invalid"
      with pytest.raises(ValueError):
          cugraph.k_core(G, degree_type=degree_type)
  
file_path: cugraph/python/cugraph/cugraph/tests/core/test_k_core.py
imports: import gc
  import pytest
  import networkx
  import cugraph
  from cugraph.testing import utils, UNDIRECTED_DATASETS
label_desc: Use image node_id 7 for calling a global function with example usage: test_k_core_invalid_input() without return types