code: def expand_paths(paths, marker='*'):
      
      if is_path(paths) and marker in paths:
          return sglob(paths)
  
      if is_path_obj(paths) and marker in paths.as_posix():
          # TBD: Is it better to return [p :: pathlib.Path] instead?
          return [normpath(p) for p in sglob(paths.as_posix())]
  
      return list(_expand_paths_itr(paths, marker=marker))
docs: :param paths:
          A glob path pattern string or pathlib.Path object holding such path, or
          a list consists of path strings or glob path pattern strings or
          pathlib.Path object holding such ones, or file objects
      :param marker: Glob marker character or string, e.g. '*'
  
      :return: List of path strings
  
      >>> expand_paths([])
      []
      >>> expand_paths("/usr/lib/a/b.conf /etc/a/b.conf /run/a/b.conf".split())
      ['/usr/lib/a/b.conf', '/etc/a/b.conf', '/run/a/b.conf']
      >>> paths_s = os.path.join(os.path.dirname(__file__), "u*.py")
      >>> ref = sglob(paths_s)
      >>> assert expand_paths(paths_s) == ref
      >>> ref = ["/etc/a.conf"] + ref
      >>> assert expand_paths(["/etc/a.conf", paths_s]) == ref
      >>> strm = anyconfig.compat.StringIO()
      >>> assert expand_paths(["/etc/a.conf", strm]) == ["/etc/a.conf", strm]