input: Write a function to create a class in Python called Song which meets the following criteria. The class should have two instance variables, title and artist, and three methods: str(), eq(), and length(). The str() method should return a formatted string with the title and artist. The eq() method should compare two instances of the Song class based on their title and artist, returning True if they are equal and False otherwise. The length() method should return the length of the title of the song.
  
  def create_song_class():
      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
  
  assert str(create_song_class()("Bohemian Rhapsody", "Queen")) == 'Title: Bohemian Rhapsody\nArtist: Queen'
  assert create_song_class()("Bohemian Rhapsody", "Queen") == create_song_class()("Bohemian Rhapsody", "Queen")
  assert create_song_class()("Bohemian Rhapsody", "Queen") != create_song_class()("Another One Bites the Dust", "Queen")
  assert create_song_class()("Bohemian Rhapsody", "Queen").length() == 16
  assert create_song_class()("A", "B").length() == 1
  assert str(create_song_class()("Imagine", "John Lennon")) == 'Title: Imagine\nArtist: John Lennon'
  assert create_song_class()("Imagine", "John Lennon") == create_song_class()("Imagine", "John Lennon")
  assert create_song_class()("Imagine", "John Lennon") != create_song_class()("Hey Jude", "The Beatles")
  assert create_song_class()("Imagine", "John Lennon").length() == 7
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)