<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_go_cmd(self, cmd, gopath=None, args=None):
 """Creates a Go command that is optionally targeted to a Go workspace. :param string cmd: Go command to execute, e.g. 'test' for `go test` :param string gopath: An optional $GOPATH which points to a valid Go workspace from which to run the command. :param list args: A list of arguments and flags to pass to the Go command. :returns: A go command that can be executed later. :rtype: :class:`GoDistribution.GoCommand` """

    return self.GoCommand._create(self.goroot, cmd, go_env=self.go_env(gopath=gopath), args=args)