code: def generate_buffer_lookup_code(self, code, index_cnames):
      # Create buffer lookup and return it
      # This is done via utility macros/inline functions, which vary
      # according to the access mode used.
      params = []
      nd = self.type.ndim
      mode = self.type.mode
      if mode == "full":
          for i, s, o in zip(
              index_cnames,
              self.get_buf_stridevars(),
              self.get_buf_suboffsetvars(),
          ):
              params.append(i)
              params.append(s)
              params.append(o)
          funcname = "__Pyx_BufPtrFull%dd" % nd
          funcgen = buf_lookup_full_code
      else:
          if mode == "strided":
              funcname = "__Pyx_BufPtrStrided%dd" % nd
              funcgen = buf_lookup_strided_code
          elif mode == "c":
              funcname = "__Pyx_BufPtrCContig%dd" % nd
              funcgen = buf_lookup_c_code
          elif mode == "fortran":
              funcname = "__Pyx_BufPtrFortranContig%dd" % nd
              funcgen = buf_lookup_fortran_code
          else:
              assert False
          for i, s in zip(index_cnames, self.get_buf_stridevars()):
              params.append(i)
              params.append(s)
  
      # Make sure the utility code is available
      if funcname not in code.globalstate.utility_codes:
          code.globalstate.utility_codes.add(funcname)
          protocode = code.globalstate["utility_code_proto"]
          defcode = code.globalstate["utility_code_def"]
          funcgen(protocode, defcode, name=funcname, nd=nd)
  
      buf_ptr_type_code = self.buf_ptr_type.empty_declaration_code()
      ptrcode = "%s(%s, %s, %s)" % (
          funcname,
          buf_ptr_type_code,
          self.buf_ptr,
          ", ".join(params),
      )
      return ptrcode
  
imports: from __future__ import absolute_import
  from .Visitor import CythonTransform
  from .ModuleNode import ModuleNode
  from .Errors import CompileError
  from .UtilityCode import CythonUtilityCode
  from .Code import UtilityCode, TempitaUtilityCode
  from .None import Options
  from .None import Interpreter
  from .None import PyrexTypes
  from .None import Naming
  from .None import Symtab
label_desc: Use image node_id 7 for calling the BufferEntry obj's underlying member method code with example usage: obj.generate_buffer_lookup_code(code, index_cnames) and returns: ptrcode