parameters: (name, package)
return_statement: return _resolve_name(name[level:], package, level)
docstring: Resolve a relative module name to an absolute one.
docstring_summary: Resolve a relative module name to an absolute one.
docstring_tokens: Resolve a relative module name to an absolute one .
function: def resolve_name(name, package):
      """Resolve a relative module name to an absolute one."""
      if not name.startswith('.'):
          return name
      elif not package:
          raise ValueError(f'no package specified for {repr(name)} '
                           '(required for relative module names)')
      level = 0
      for character in name:
          if character != '.':
              break
          level += 1
      return _resolve_name(name[level:], package, level)
function_tokens: def resolve_name ( name , package ) : if not name . startswith ( '.' ) : return name elif not package : raise ValueError ( f'no package specified for {repr(name)} ' '(required for relative module names)' ) level = 0 for character in name : if character != '.' : break level += 1 return _resolve_name ( name [ level : ] , package , level )