<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _go_install(self, target, gopath, build_flags):
 """Create and execute a `go install` command."""

    args = build_flags + [target.import_path]
    result, go_cmd = self.go_dist.execute_go_cmd(
      'install', gopath=gopath, args=args,
      workunit_factory=self.context.new_workunit,
      workunit_name='install {}'.format(target.import_path),
      workunit_labels=[WorkUnitLabel.COMPILER])
    if result != 0:
      raise TaskError('{} failed with exit code {}'.format(go_cmd, result))