@Nullable @Override public PsiElement resolve(){
  String keyword=myElement.getName();
  if (keyword == null) {
    return null;
  }
  FunctionStatement function=resolveFunction();
  if (function == null) {
    return null;
  }
  Parameter.StarStar kwargsParameter=null;
  for (  Parameter param : function.getParameters()) {
    if (param instanceof Parameter.StarStar) {
      kwargsParameter=(Parameter.StarStar)param;
      continue;
    }
    if (keyword.equals(param.getName())) {
      return param;
    }
  }
  if (kwargsParameter != null) {
    return kwargsParameter;
  }
  return null;
}

@ Nullable @ Override public PsiElement resolve ( ) { String keyword = myElement . getName ( ) ; if ( keyword == null ) { return null ; } FunctionStatement function = resolveFunction ( ) ; if ( function == null ) { return null ; } Parameter . StarStar kwargsParameter = null ; for ( Parameter param : function . getParameters ( ) ) { if ( param instanceof Parameter . StarStar ) { kwargsParameter = ( Parameter . StarStar ) param ; continue ; } if ( keyword . equals ( param . getName ( ) ) ) { return param ; } } if ( kwargsParameter != null ) { return kwargsParameter ; } return null ; }
find the referenced function . if it has a keyword parameter with matching name , return that . otherwise if it has a * * kwargs param , return that . else return the function itself .
