code: def add_z(self, name, prior, q, index=True):
          
  
          self.z_list.append(LatentVariable(name,len(self.z_list),prior,q))
          if index is True:
              self.z_indices[name] = {'start': len(self.z_list)-1, 'end': len(self.z_list)-1}
docs: Adds latent variable
  
          Parameters
          ----------
          name : str
              Name of the latent variable
  
          prior : Prior object
              Which prior distribution? E.g. Normal(0,1)
  
          q : Distribution object
              Which distribution to use for variational approximation
  
          index : boolean
              Whether to index the variable in the z_indices dictionary
  
          Returns
          ----------
          None (changes priors in LatentVariables object)