nodes: 0, module; 1, function_definition; 2, function_name:get; 3, parameters; 4, block; 5, identifier:dic; 6, identifier:path; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, expression_statement; 11, if_statement; 12, try_statement; 13, identifier:seps; 14, identifier:PATH_SEPS; 15, identifier:idx_reg; 16, identifier:_JSNP_GET_ARRAY_IDX_REG; 17, comment:"""getter for nested dicts.
  
      :param dic: a dict[-like] object
      :param path: Path expression to point object wanted
      :param seps: Separator char candidates
      :return: A tuple of (result_object, error_message)
  
      >>> d = {'a': {'b': {'c': 0, 'd': [1, 2]}}, '': 3}
      >>> assert get(d, '/') == (3, '')  # key becomes '' (empty string).
      >>> assert get(d, "/a/b/c") == (0, '')
      >>> sorted(get(d, "a.b")[0].items())
      [('c', 0), ('d', [1, 2])]
      >>> (get(d, "a.b.d"), get(d, "/a/b/d/1"))
      (([1, 2], ''), (2, ''))
      >>> get(d, "a.b.key_not_exist")  # doctest: +ELLIPSIS
      (None, "'...'")
      >>> get(d, "/a/b/d/2")
      (None, 'list index out of range')
      >>> get(d, "/a/b/d/-")  # doctest: +ELLIPSIS
      (None, 'list indices must be integers...')
      """; 18, assignment; 19, not_operator; 20, block; 21, block; 22, except_clause; 23, identifier:items; 24, list_comprehension; 25, identifier:items; 26, return_statement; 27, if_statement; 28, expression_statement; 29, expression_statement; 30, return_statement; 31, as_pattern; 32, block; 33, call; 34, for_in_clause; 35, tuple; 36, comparison_operator:len(items) == 1; 37, block; 38, assignment; 39, assignment; 40, conditional_expression:(prnt[int(items[-1])], '') if arr else (prnt[items[-1]], ''); 41, tuple; 42, as_pattern_target; 43, return_statement; 44, identifier:_jsnp_unescape; 45, argument_list; 46, identifier:p; 47, call; 48, identifier:dic; 49, string; 50, call; 51, integer:1; 52, return_statement; 53, identifier:prnt; 54, call; 55, identifier:arr; 56, boolean_operator; 57, tuple; 58, identifier:arr; 59, tuple; 60, identifier:TypeError; 61, identifier:KeyError; 62, identifier:IndexError; 63, identifier:exc; 64, tuple; 65, identifier:p; 66, identifier:_split_path; 67, argument_list; 68, identifier:len; 69, argument_list; 70, tuple; 71, attribute; 72, argument_list; 73, call; 74, call; 75, subscript; 76, string; 77, subscript; 78, string; 79, None; 80, call; 81, identifier:path; 82, identifier:seps; 83, identifier:items; 84, subscript; 85, string; 86, identifier:functools; 87, identifier:reduce; 88, attribute; 89, subscript; 90, identifier:dic; 91, attribute; 92, argument_list; 93, attribute; 94, argument_list; 95, identifier:prnt; 96, call; 97, identifier:prnt; 98, subscript; 99, identifier:str; 100, argument_list; 101, identifier:dic; 102, subscript; 103, identifier:operator; 104, identifier:getitem; 105, identifier:items; 106, slice; 107, attribute; 108, identifier:is_list_like; 109, identifier:prnt; 110, identifier:idx_reg; 111, identifier:match; 112, subscript; 113, identifier:int; 114, argument_list; 115, identifier:items; 116, unary_operator; 117, identifier:exc; 118, identifier:items; 119, integer:0; 120, unary_operator; 121, identifier:anyconfig; 122, identifier:utils; 123, identifier:items; 124, unary_operator; 125, subscript; 126, integer:1; 127, integer:1; 128, integer:1; 129, identifier:items; 130, unary_operator; 131, integer:1
code: def get(dic, path, seps=PATH_SEPS, idx_reg=_JSNP_GET_ARRAY_IDX_REG):
      """getter for nested dicts.
  
      :param dic: a dict[-like] object
      :param path: Path expression to point object wanted
      :param seps: Separator char candidates
      :return: A tuple of (result_object, error_message)
  
      >>> d = {'a': {'b': {'c': 0, 'd': [1, 2]}}, '': 3}
      >>> assert get(d, '/') == (3, '')  # key becomes '' (empty string).
      >>> assert get(d, "/a/b/c") == (0, '')
      >>> sorted(get(d, "a.b")[0].items())
      [('c', 0), ('d', [1, 2])]
      >>> (get(d, "a.b.d"), get(d, "/a/b/d/1"))
      (([1, 2], ''), (2, ''))
      >>> get(d, "a.b.key_not_exist")  # doctest: +ELLIPSIS
      (None, "'...'")
      >>> get(d, "/a/b/d/2")
      (None, 'list index out of range')
      >>> get(d, "/a/b/d/-")  # doctest: +ELLIPSIS
      (None, 'list indices must be integers...')
      """
      items = [_jsnp_unescape(p) for p in _split_path(path, seps)]
      if not items:
          return (dic, '')
      try:
          if len(items) == 1:
              return (dic[items[0]], '')
  
          prnt = functools.reduce(operator.getitem, items[:-1], dic)
          arr = anyconfig.utils.is_list_like(prnt) and idx_reg.match(items[-1])
          return (prnt[int(items[-1])], '') if arr else (prnt[items[-1]], '')
  
      except (TypeError, KeyError, IndexError) as exc:
          return (None, str(exc))