code: public static Map<String, String> getKeywordMap(ApplicationContext context) {
          Map<String, String> keywordToBeanMap = new HashMap<String, String>();
  
          // Retrieve beans implementing the Keyword interface.
          String[] beanNames = context.getBeanNamesForType(Keyword.class);
  
          for (String beanName : beanNames) {
              Object bean = context.getBean(beanName);
  
              // Retrieve keyword information
              KeywordInfo keywordInfo = AnnotationUtils.findAnnotation(bean.getClass(), KeywordInfo.class);
  
              // Set keyword name as specified in the keyword info, or if information is not available, use bean name.
              String keywordName = keywordInfo != null ? keywordInfo.name() : beanName;
  
              if (keywordToBeanMap.put(keywordName, beanName) != null) {
                  // If map already contains the keyword name, throw an exception. Keywords should be unique.
                  throw new RuntimeException("Multiple definitions for keyword '" + keywordName + "' exists.");
              }
          }
  
          return keywordToBeanMap;
      }
docs: Builds mapping of robot keywords to actual bean names in spring context.
  
  @param context Spring application context.
  @return mapping of robot keywords to bean names