code: def get_test_attrs():
      """Create some dataset attributes for testing purpose.
  
      Returns:
          Attributes, encoded attributes, encoded and flattened attributes
  
      """
      attrs = {
          "name": "IR_108",
          "start_time": datetime.datetime(2018, 1, 1, 0),
          "end_time": datetime.datetime(2018, 1, 1, 0, 15),
          "int": 1,
          "float": 1.0,
          "none": None,  # should be dropped
          "numpy_int": np.uint8(1),
          "numpy_float": np.float32(1),
          "numpy_bool": True,
          "numpy_void": np.void(0),
          "numpy_bytes": np.bytes_("test"),
          "numpy_string": np.str_("test"),
          "list": [1, 2, np.float64(3)],
          "nested_list": ["1", ["2", [3]]],
          "bool": True,
          "array": np.array([1, 2, 3], dtype="uint8"),
          "array_bool": np.array([True, False, True]),
          "array_2d": np.array([[1, 2], [3, 4]]),
          "array_3d": np.array([[[1, 2], [3, 4]], [[1, 2], [3, 4]]]),
          "dict": {"a": 1, "b": 2},
          "nested_dict": {
              "l1": {"l2": {"l3": np.array([1, 2, 3], dtype="uint8")}}
          },
          "raw_metadata": OrderedDict(
              [
                  (
                      "recarray",
                      np.zeros(3, dtype=[("x", "i4"), ("y", "u1")]),
                  ),
                  ("flag", np.bool_(True)),
                  (
                      "dict",
                      OrderedDict(
                          [
                              ("a", 1),
                              ("b", np.array([1, 2, 3], dtype="uint8")),
                          ]
                      ),
                  ),
              ]
          ),
      }
      encoded = {
          "name": "IR_108",
          "start_time": "2018-01-01 00:00:00",
          "end_time": "2018-01-01 00:15:00",
          "int": 1,
          "float": 1.0,
          "numpy_int": np.uint8(1),
          "numpy_float": np.float32(1),
          "numpy_bool": "true",
          "numpy_void": "[]",
          "numpy_bytes": "test",
          "numpy_string": "test",
          "list": [1, 2, np.float64(3)],
          "nested_list": '["1", ["2", [3]]]',
          "bool": "true",
          "array": np.array([1, 2, 3], dtype="uint8"),
          "array_bool": ["true", "false", "true"],
          "array_2d": "[[1, 2], [3, 4]]",
          "array_3d": "[[[1, 2], [3, 4]], [[1, 2], [3, 4]]]",
          "dict": '{"a": 1, "b": 2}',
          "nested_dict": '{"l1": {"l2": {"l3": [1, 2, 3]}}}',
          "raw_metadata": '{"recarray": [[0, 0], [0, 0], [0, 0]], '
          '"flag": "true", "dict": {"a": 1, "b": [1, 2, 3]}}',
      }
      encoded_flat = {
          "name": "IR_108",
          "start_time": "2018-01-01 00:00:00",
          "end_time": "2018-01-01 00:15:00",
          "int": 1,
          "float": 1.0,
          "numpy_int": np.uint8(1),
          "numpy_float": np.float32(1),
          "numpy_bool": "true",
          "numpy_void": "[]",
          "numpy_bytes": "test",
          "numpy_string": "test",
          "list": [1, 2, np.float64(3)],
          "nested_list": '["1", ["2", [3]]]',
          "bool": "true",
          "array": np.array([1, 2, 3], dtype="uint8"),
          "array_bool": ["true", "false", "true"],
          "array_2d": "[[1, 2], [3, 4]]",
          "array_3d": "[[[1, 2], [3, 4]], [[1, 2], [3, 4]]]",
          "dict_a": 1,
          "dict_b": 2,
          "nested_dict_l1_l2_l3": np.array([1, 2, 3], dtype="uint8"),
          "raw_metadata_recarray": "[[0, 0], [0, 0], [0, 0]]",
          "raw_metadata_flag": "true",
          "raw_metadata_dict_a": 1,
          "raw_metadata_dict_b": np.array([1, 2, 3], dtype="uint8"),
      }
      return attrs, encoded, encoded_flat
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_test_attrs() and returns: attrs,  encoded,  encoded_flat