code: def top_k(a, k=1):
      """Finds values of the k largest elements in the blob.
      The result is a blob of size k.
      """
      if not type(a) is Blob:
          raise ValueError("`a` should be neoml.Blob.")
  
      if int(k) <= 0:
          raise ValueError("`k` should be > 0.")
  
      if a.size == 0:
          raise ValueError("The blob shouldn't be empty.")
  
      return Blob(PythonWrapper.blob_top_k(a._internal, int(k)))
  
imports: import neoml
  import neoml.PythonWrapper
  from neoml.MathEngine import MathEngine
  from neoml.Blob import Blob
  import numpy
label_desc: Use image node_id 20 for calling a global function with example usage: top_k(a, k) and returns: Blob