def _FilterAndFormatImports(import_dict, signature_types):
  """Returns formatted imports required by the passed signature types."""
  formatted_imports = [
      'import %s;' % import_dict[t] for t in signature_types if t in import_dict
  ]
  return sorted(formatted_imports)