parameters: (target: str)
docstring: Changes current directory to target.
  
      Args:
          target: target directory.
docstring_summary: Changes current directory to target.
docstring_tokens: Changes current directory to target .
function: def cd(target: str) -> Iterator[None]:
      """Changes current directory to target.
  
      Args:
          target: target directory.
      """
      prev = os.getcwd()
      os.chdir(os.path.expanduser(target))
      try:
          yield
      finally:
          os.chdir(prev)
function_tokens: def cd ( target : str ) -> Iterator [ None ] : prev = os . getcwd ( ) os . chdir ( os . path . expanduser ( target ) ) try : yield finally : os . chdir ( prev )