input: from typing import List
  
  def create_song_class() -> type:
      """ Generate and return a class named 'Song' with the following specification:
      1. The constructor __init__ should accept two parameters 'title' and 'artist'.
      2. The __str__ method should return a string formatted as 'Title: {self.title}\nArtist: {self.artist}'.
      3. The __eq__ method should return True if both the title and artist of self and other are the same, otherwise False.
      4. The length method should return the number of characters in the song title.
      
      Expected behavior:
      s1 = create_song_class()('Bohemian Rhapsody', 'Queen')
      assert str(s1) == 'Title: Bohemian Rhapsody\nArtist: Queen'
      s2 = create_song_class()('Bohemian Rhapsody', 'Queen')
      assert s1 == s2
      assert s1.length() == 17
      s3 = create_song_class()('Lose Yourself', 'Eminem')
      assert s1 != s3
      assert s3.length() == 11
      """
      class Song:
          def __init__(self, title, artist):
              self.title = title
              self.artist = artist
        
          def __str__(self):
              return f'Title: {self.title}\nArtist: {self.artist}'
          
          def __eq__(self, other):
              return self.artist == other.artist and self.title == other.title
  
          def length(self):
              return len(self.title)
      
      return Song
output:     class Song:
          def __init__(self, title, artist):
              self.title = title
              self.artist = artist
        
          def __str__(self):
              return f'Title: {self.title}\nArtist: {self.artist}'
          
          def __eq__(self, other):
              return self.artist == other.artist and self.title == other.title
  
          def length(self):
              return len(self.title)
      
      return Song