<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_json_val(source, path, *, ignore_bad_path=False):
 """Get the nested value identified by the json path, rooted at source."""

  try:
    return JP.find(source, path)
  except JP.JSONPathError as ex:
    if ignore_bad_path:
      return None
    else:
      raise