class_docstr: A printer to convert SymPy expressions to strings of R code
class_docstr_tok: ["A","printer","to","convert","SymPy","expressions","to","strings","of","R","code"]
docstr: Returns a tuple (open_lines, close_lines) containing lists of codelines
          
docstr_tok: ["Returns","a","tuple","(","open_lines",",","close_lines",")","containing","lists","of","codelines"]
code: def _get_loop_opening_ending(self, indices):
      """Returns a tuple (open_lines, close_lines) containing lists of codelines"""
      open_lines = []
      close_lines = []
      loopstart = "for (%(var)s in %(start)s:%(end)s){"
      for i in indices:
          # R arrays start at 1 and end at dimension
          open_lines.append(
              loopstart
              % {
                  "var": self._print(i.label),
                  "start": self._print(i.lower + 1),
                  "end": self._print(i.upper + 1),
              }
          )
          close_lines.append("}")
      return open_lines, close_lines
  
imports: from __future__ import annotations
  from typing import Any
  from sympy.core.numbers import equal_valued
  from sympy.printing.codeprinter import CodePrinter
  from sympy.printing.precedence import precedence, PRECEDENCE
  from sympy.sets.fancysets import Range
label_desc: Use image node_id 8 for calling the RCodePrinter obj's underlying member method code with example usage: obj._get_loop_opening_ending(indices) and returns: open_lines,  close_lines