code: def from_param(cls, param):
          
          if isinstance(param, cls):
              return param
          if isinstance(param, list):
              return cls(param)
          if param is None:
              return cls.from_environment()
          # otherwise, assume it's a string.
          return cls.from_string(param)
docs: Construct a CommandSpec from a parameter to build_scripts, which may
          be None.