code: def query(pattern_path, dict_, max_length=None, strip=False,
            case_sensitive=False, unique=False, deduplicate=False,
            string_transformations=None, hyperlink=False,
            return_multiple_columns=False):
      if string_transformations is None:
          string_transformations = []
      if max_length:
          string_transformations.append(lambda x: x[:max_length])
      if hyperlink:
          string_transformations.append(
              lambda x: '=HYPERLINK("{0}")'.format(x))
      if isinstance(pattern_path, basestring):
          pattern_path = [pattern_path]
      original_pattern_path = pattern_path
      pattern_path = pattern_path[:]
      pattern_path.reverse()
      result = _process_object(pattern_path, dict_,
                               string_transformations=string_transformations,
                               strip=strip, case_sensitive=case_sensitive,
                               return_multiple_columns=return_multiple_columns)
      if not result:
          return None
      elif isinstance(result, dict):
          return _flatten(result)
      elif len(result) == 1:
          return result[0]
      else:
          if unique:
              msg = "pattern_path: {0}\n\n".format(original_pattern_path)
              msg = msg + pprint.pformat(dict_)
              raise UniqueError(msg)
          if deduplicate:
              new_result = []
              for item in result:
                  if item not in new_result:
                      new_result.append(item)
              result = new_result
          return result