original_docstring: Converts text to defined case.
docstring: Converts text to defined case.
docstring_tokens: Converts text to defined case .
code: def convert_case(text, to_lower=True):
      """Converts text to defined case."""
  
      # If text is empty, return None.
      if not text: return None
      # If texts is tokenized, merge tokens.
      if is_tokenized(text):
          was_tokenized = True
          normalized_text = merge_tokens(text)
      else:
          was_tokenized = False
          normalized_text = text
  
      # If to lower, convert to lower case. Else, convert to upper case.
      if to_lower:
          normalized_text = normalized_text.lower()
      else:
          normalized_text = normalized_text.upper()
  
      # If text was tokenized, re-tokenize text.
      if was_tokenized:
          normalized_text = word_tokenize(normalized_text)
  
      # Return normalized text.
      return normalized_text
code_tokens: def convert_case ( text , to_lower = True ) : if not text : return None if is_tokenized ( text ) : was_tokenized = True normalized_text = merge_tokens ( text ) else : was_tokenized = False normalized_text = text if to_lower : normalized_text = normalized_text . lower ( ) else : normalized_text = normalized_text . upper ( ) if was_tokenized : normalized_text = word_tokenize ( normalized_text ) return normalized_text
short_docstring: Converts text to defined case.
short_docstring_tokens: Converts text to defined case .
comment: """Converts text to defined case."""$SEP$# If text is empty, return None.$SEP$# If texts is tokenized, merge tokens.$SEP$# If to lower, convert to lower case. Else, convert to upper case.$SEP$# If text was tokenized, re-tokenize text.$SEP$# Return normalized text.