<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _generate_examples(self, file_path):
 """Generate features and target given the directory path. Args: file_path: path where the csv file is stored Yields: The features and the target """


    with tf.io.gfile.GFile(file_path) as f:
      raw_data = csv.DictReader(f)
      for row in raw_data:
        survive_val = row.pop("survived")
        yield {
            "survived": convert_to_label(survive_val, _SURVIVED_DICT),
            "features": {
                name: FEATURE_DICT[name][1](value)
                for name, value in row.items()
            }
        }