code: def set(self, keyword, default, from_env=True):
          
          env_key = '{}{}'.format(self.ENV_PREFIX, keyword.upper())
          if hasattr(self, keyword):
              return getattr(self, keyword)
          value = default
          if from_env and (env_key in env):
              env_val = env.get(env_key)
              should_eval = not isinstance(default, str)
              try:
                  value = literal_eval(env_val) if should_eval else env_val
              except (ValueError, SyntaxError):
                  raise ValueError("Unable to cast %r to %r" % (
                      env_val, type.__name__))
          setattr(self, keyword, value)
          return getattr(self, keyword)
docs: Set value on self if not already set. If unset, attempt to
          retrieve from environment variable of same name (unless disabled
          via 'from_env'). If 'default' value is not a string, evaluate
          environment variable as a Python type. If no env variables are
          found, fallback to 'default' value.