def _is_prefix(prefix, name):
  """Determines whether one fullname is a prefix of another.

  Args:
    prefix: The fullname that might be a prefix.
    name: The entire fullname.

  Returns:
    A boolean indicating whether or not the first fullname is a prefix of the
        second.
  """
  prefix_parts = prefix.split('.') if prefix else []
  name_parts = name.split('.') if name else []
  return name_parts[:len(prefix_parts)] == prefix_parts