code: def test_series_nlargest_nelem(nelem):
      np.random.seed(0)
      elems = np.random.random(nelem)
      gds = Series(elems).nlargest(nelem)
      pds = pd.Series(elems).nlargest(nelem)
  
      assert (pds == gds.to_pandas()).all().all()
  
imports: import string
  from itertools import product
  import numpy
  import pandas
  import pytest
  from cudf import DataFrame, Series
  from cudf.core.column import NumericalColumn
  from cudf.testing._utils import DATETIME_TYPES, NUMERIC_TYPES, assert_eq, assert_exceptions_equal, expect_warning_if
label_desc: Use image node_id 15 for calling a global function with example usage: test_series_nlargest_nelem(nelem) without return types