code: def get_rpaths(filename):
      
      try:
          lines = _cmd_out_err(['otool', '-l', filename])
      except RuntimeError:
          return ()
      if not _line0_says_object(lines[0], filename):
          return ()
      lines = [line.strip() for line in lines]
      paths = []
      line_no = 1
      while line_no < len(lines):
          line = lines[line_no]
          line_no += 1
          if line != 'cmd LC_RPATH':
              continue
          cmdsize, path = lines[line_no:line_no+2]
          assert cmdsize.startswith('cmdsize ')
          paths.append(RPATH_RE.match(path).groups()[0])
          line_no += 2
      return tuple(paths)
docs: Return a tuple of rpaths from the library `filename`
  
      If `filename` is not a library then the returned tuple will be empty.
  
      Parameters
      ----------
      filaname : str
          filename of library
  
      Returns
      -------
      rpath : tuple
          rpath paths in `filename`