code: def test_add_obs_function(self):
      expected_obs_xml = etree.XML(
          """
  <ObsFunction>
    <CondProb>
      <Var>obs_sensor</Var>
      <Parent>action_rover rover_1 rock_1</Parent>
      <Parameter type="TBL">
        <Entry>
          <Instance>amw * * - </Instance>
          <ProbTable>1.0 0.0</ProbTable>
        </Entry>
        <Entry>
          <Instance>ame * * - </Instance>
          <ProbTable>1.0 0.0</ProbTable>
        </Entry>
        <Entry>
          <Instance>as * * - </Instance>
          <ProbTable>1.0 0.0</ProbTable>
        </Entry>
        <Entry>
          <Instance>ac s0 - - </Instance>
          <ProbTable>1.0 0.0 0.0 1.0</ProbTable>
        </Entry>
        <Entry>
          <Instance>ac s1 - - </Instance>
          <ProbTable>0.8 0.2 0.2 0.8</ProbTable>
        </Entry>
        <Entry>
          <Instance>ac s2 * - </Instance>
          <ProbTable>1.0 0.0</ProbTable>
        </Entry>
      </Parameter>
    </CondProb>
  </ObsFunction>"""
      )
      self.maxDiff = None
      self.assertEqual(
          self.writer.add_obs_function(),
          etree.tostring(expected_obs_xml),
      )
  
imports: import io
  import sys
  import unittest
  import xml.etree.ElementTree
  from pgmpy.readwrite import PomdpXReader, PomdpXWriter
label_desc: Use image node_id 5 for calling the TestPomdpXWriter obj's underlying member method code with example usage: obj.test_add_obs_function() without return types