code: def get_username_max_len():
      
      fields = [field for field in USER._meta.fields if field.name == 'username']
      try:
          length = fields[0].max_length
      except IndexError:
          length = 30
      return length
docs: Returns username maximum length as supported by Django.
  
      :rtype: int