class_docstr: Initializes a NETReader object.
  
  Parameters
  ----------
  path : file or str
      File of net data
  
  string : str
      String of net data
  
  include_properties: boolean
      If True, gets the properties tag from the file and stores in graph properties.
  
  defaultname: int (default: "bn_model")
      Default name for the network if a network name is not available in the net file.
  
  Examples
  --------
  # asia.net file is present at
  # https://www.bnlearn.com/bnrepository/discrete-small.html#asia
  >>> from pgmpy.readwrite import NETReader
  >>> reader = NETReader("asia.net")
  >>> reader
  <pgmpy.readwrite.NET.NETReader at 0x7feac645c640>
  >>> model = reader.get_model()
docstr: Returns the Bayesian Model read from the file/str.
  
  Parameters
  ----------
  state_name_type: int, str or bool (default: str)
      The data type to which to convert the state names of the variables.
  
  Example
  ----------
  # asia.net file is present at
  # https://www.bnlearn.com/bnrepository/discrete-small.html#asia
  >>> from pgmpy.readwrite import NETReader
  >>> reader = NETReader("asia.net")
  >>> reader.get_model()
  <pgmpy.models.BayesianNetwork.BayesianNetwork at 0x7febc059b430>
docstr_tok: ["Returns","the","Bayesian","Model","read","from","the","file\/str",".","Parameters","--","--","--","--","--","state_name_type",":","int",",","str","or","bool","(","default",":","str",")","The","data","type","to","which","to","convert","the","state","names","of","the","variables",".","Example","--","--","--","--","--","#","asia.net","file","is","present","at","#","https",":","\/\/www.bnlearn.com\/bnrepository\/discrete-small.html","#","asia",">",">",">","from","pgmpy.readwrite","import","NETReader",">",">",">","reader","=","NETReader","(","``","asia.net","''",")",">",">",">","reader.get_model","(",")","<","pgmpy.models.BayesianNetwork.BayesianNetwork","at","0x7febc059b430",">"]
code: def get_model(self, state_name_type=str):
      """
      Returns the Bayesian Model read from the file/str.
  
      Parameters
      ----------
      state_name_type: int, str or bool (default: str)
          The data type to which to convert the state names of the variables.
  
      Example
      ----------
      # asia.net file is present at
      # https://www.bnlearn.com/bnrepository/discrete-small.html#asia
      >>> from pgmpy.readwrite import NETReader
      >>> reader = NETReader("asia.net")
      >>> reader.get_model()
      <pgmpy.models.BayesianNetwork.BayesianNetwork at 0x7febc059b430>
      """
      try:
          model = BayesianNetwork()
          model.add_nodes_from(self.variable_names)
          model.add_edges_from(self.edges)
          model.name = self.network_name
  
          tabular_cpds = []
          for var in sorted(self.variable_cpds.keys()):
              values = self.variable_cpds[var]
              states = self.variable_states[var]
              states_num = len(states)
              parents = self.variable_parents[var]
              parent_states_num = [
                  len(self.variable_states[par]) for par in parents
              ]
  
              state_names = {
                  par_var: list(
                      map(
                          state_name_type, self.variable_states[par_var]
                      )
                  )
                  for par_var in parents
              }
              state_names[var] = list(map(state_name_type, states))
  
              cpd = TabularCPD(
                  var,
                  states_num,
                  values,
                  evidence=parents,
                  evidence_card=parent_states_num,
                  state_names=state_names,
              )
              tabular_cpds.append(cpd)
  
          model.add_cpds(*tabular_cpds)
  
          if self.include_properties:
              for node, properties in self.variable_properties.items():
                  for prop_name, prop_value in properties.items():
                      model.nodes[node][prop_name] = prop_value
  
          return model
  
      except AttributeError:
          raise AttributeError(
              "First get states of variables, edges, parents and network name"
          )
  
imports: import collections
  from math import prod
  from string import Template
  import numpy
  from pyparsing import CharsNotIn, Group, OneOrMore, Optional, Suppress, Word, ZeroOrMore, alphanums, alphas, cppStyleComment, nums, printables
  from pgmpy.factors.discrete.CPD import TabularCPD
  from pgmpy.models import BayesianNetwork
  from pgmpy.utils import compat_fns
label_desc: Use image node_id 11 for calling the NETReader obj's underlying member method code with example usage: obj.get_model(state_name_type) and returns: model