code: def titleize(word):
      
      return re.sub(
          r"\b('?[a-z])",
          lambda match: match.group(1).capitalize(),
          humanize(underscore(word))
      )
docs: Capitalize all the words and replace some characters in the string to
      create a nicer looking title. :func:`titleize` is meant for creating pretty
      output.
  
      Examples::
  
        >>> titleize("man from the boondocks")
        "Man From The Boondocks"
        >>> titleize("x-men: the last stand")
        "X Men: The Last Stand"
        >>> titleize("TheManWithoutAPast")
        "The Man Without A Past"
        >>> titleize("raiders_of_the_lost_ark")
        "Raiders Of The Lost Ark"