import re


def SplitWords(input_string):
  """Split by '_' if found, otherwise split at uppercase/numeric chars.

  Will split "some_TEXT" into ["some", "TEXT"], "CamelCase" into ["Camel",
  "Case"], and "Vector3" into ["Vector", "3"].
  """
  if input_string.find('_') > -1:
    # 'some_TEXT_' -> 'some TEXT'
    return input_string.replace('_', ' ').strip().split()
  else:
    input_string = input_string.replace('::', ' ')
    if re.search('[A-Z]', input_string) and re.search('[a-z]', input_string):
      # mixed case.
      # look for capitalization to cut input_strings
      # 'SomeText' -> 'Some Text'
      input_string = re.sub('([A-Z])', r' \1', input_string).strip()
      # 'Vector3' -> 'Vector 3'
      input_string = re.sub('([^0-9])([0-9])', r'\1 \2', input_string)
    return input_string.split()