@Nullable
  private static AccessibilityNodeInfoCompat createNodeInfoFromView(@Nullable View view) {
    return createNodeInfoFromView(view, NODE_INFO_CREATION_RETRY_COUNT);
  }
Gets the role from a given {@link AccessibilityNodeInfoCompat}. If no role is defined it will
return AccessibilityRole.NONE, which has a value of null.

@param nodeInfo The node to check.
@return {@code AccessibilityRole} the defined role.
core/src/main/java/com/facebook/testing/screenshot/layouthierarchy/AccessibilityUtil.java