code: def titanic_names(train_only=False, test_only=False):
      if train_only:
          return d_train["Name"].values.tolist()
      if test_only:
          return d_test["Name"].values.tolist()
      return (
          d_train["Name"].values.tolist(),
          d_test["Name"].values.tolist(),
      )
  
imports: import numpy
  import pandas
  from pathlib import Path
label_desc: Use image node_id 4 for calling a global function with example usage: titanic_names(train_only, test_only) and returns: d_train,  d_test, d_train, d_test