<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ExpandPath(path, opts=None):
 """Applies all expansion mechanisms to the given path. Args: path: A path to expand. opts: A `PathOpts` object. Yields: All paths possible to obtain from a given path by performing expansions. """

  precondition.AssertType(path, Text)

  for grouped_path in ExpandGroups(path):
    for globbed_path in ExpandGlobs(grouped_path, opts):
      yield globbed_path