code: def get_profile(name=None, **kwargs):
      
      if isinstance(name, Profile):
          return name
  
      clazz = get_profile_class(name or 'default')
      return clazz(**kwargs)
docs: Get the profile by name; if no name is given, return the
      default profile.