code: def test_for_each(self):
      file_path = os.path.join(self.resource_path, "orca/data/csv")
      shards = zoo.orca.data.pandas.read_csv(file_path)
  
      def get_item(data, key):
          return data[key]
  
      result1 = shards._for_each(get_item, "location")
      import pandas as pd
  
      assert isinstance(result1.first(), pd.Series)
      result2 = shards._for_each(get_item, "abc")
      assert isinstance(result2.first(), KeyError)
  
imports: import os.path
  import shutil
  import pytest
  from unittest import TestCase
  import zoo.orca.data
  import zoo.orca.data.pandas
  from zoo.orca import OrcaContext
  from zoo.orca.data import SharedValue
  from zoo.common.nncontext import *
  from zoo.orca.data import SparkXShards
label_desc: Use image node_id 17 for calling the TestSparkXShards obj's underlying member method code with example usage: obj.test_for_each() and returns: data