code: def get_rules(self, optimized):
          
          self.insert_start_to_accepting()
          # If CFG is not requested, avoid the following O(n^3) rule.
          # It can be solved and a string can be generated faster with BFS of DFS
  
          if optimized == 0:
              self.insert_self_to_empty_and_insert_all_intemediate(optimized)
          self.insert_symbol_pushpop()
          return self.rules
docs: Args:
              optimized (bool): Enable or Disable optimization - Do not produce O(n^3)
          Return:
              list: The CFG rules