code: def choose_username(metadata, config):
      
      if config.username is not None:
          # we allow -- but do not encourage -- database username configuration
          return config.username
  
      if config.read_only:
          # by convention, we provision read-only username for every service
          return f"{metadata.name}_ro"
  
      return metadata.name
docs: Choose the database username to use.
  
      Because databases should not be shared between services, database usernames should be
      the same as the service that uses them.