code: def SentimentAnalysis(_arg1, library="nltk"):
      """
      Sentiment Analysis is a procedure that assigns a score from -1 to 1
      for a piece of text with -1 being negative and 1 being positive. For
      more information on the function and how to use it please refer to
      tabpy-tools.md
      """
      if not (isinstance(_arg1[0], str)):
          raise TypeError
  
      supportedLibraries = {"nltk", "textblob"}
  
      library = library.lower()
      if library not in supportedLibraries:
          raise ValueError
  
      scores = []
      if library == "nltk":
          sid = SentimentIntensityAnalyzer()
          for text in _arg1:
              sentimentResults = sid.polarity_scores(text)
              score = sentimentResults["compound"]
              scores.append(score)
      elif library == "textblob":
          for text in _arg1:
              currScore = TextBlob(text)
              scores.append(currScore.sentiment.polarity)
      return scores
  
imports: from textblob import TextBlob
  import nltk
  from nltk.sentiment.vader import SentimentIntensityAnalyzer
  from tabpy.models.utils import setup_utils
  import ssl
label_desc: Use image node_id 1 for calling a global function with example usage: SentimentAnalysis(_arg1, library) and returns: scores