code: def title(self, gender: Optional[Gender] = None,
                title_type: Optional[TitleType] = None) -> str:
          
          gender_key = self._validate_enum(gender, Gender)
          title_key = self._validate_enum(title_type, TitleType)
  
          titles = self._data['title'][gender_key][title_key]
          return self.random.choice(titles)
docs: Generate a random title for name.
  
          You can generate random prefix or suffix
          for name using this method.
  
          :param gender: The gender.
          :param title_type: TitleType enum object.
          :return: The title.
          :raises NonEnumerableError: if gender or title_type in incorrect format.
  
          :Example:
              PhD.