code: def convert_to_numpy(x, columns=None):
      if isinstance(x, pd.DataFrame):
          if columns is not None:
              return x[columns].to_numpy()
          else:
              return x.to_numpy()
      elif isinstance(x, np.ndarray):
          return x
      else:
          invalidInputError(
              False, f"{type(x)} can not be converted to numpy"
          )
  
imports: import pandas
  import numpy
  from bigdl.ppml.fl import *
  from bigdl.dllib.utils.log4Error import invalidInputError
label_desc: Use image node_id 2 for calling a global function with example usage: convert_to_numpy(x, columns) and returns: x, x, x