whole_func_string: function getOffset(cursor, defaultOffset) {
      if (typeof cursor === 'undefined' || cursor === null) {
          return defaultOffset;
      }
  
      let offset = cursorToOffset(cursor);
      if (isNaN(offset)) {
          return defaultOffset;
      }
  
      return offset;
  }
func_code_string: function getOffset(cursor, defaultOffset) {
      if (typeof cursor === 'undefined' || cursor === null) {
          return defaultOffset;
      }
  
      let offset = cursorToOffset(cursor);
      if (isNaN(offset)) {
          return defaultOffset;
      }
  
      return offset;
  }
func_documentation_string: Given an optional cursor and a default offset, returns the offset to use; if the cursor contains a valid offset, that will be used, otherwise it will be the default.