





__lowercase  :   Any						      =frozenset(
    [
        """prompt""",
        """height""",
        """width""",
        """guidance_scale""",
        """negative_prompt""",
        """prompt_embeds""",
        """negative_prompt_embeds""",
        """cross_attention_kwargs""",
    ]
)

__lowercase  :   Dict						      =frozenset(["""prompt""", """negative_prompt"""])

__lowercase  :   int						      =frozenset([])

__lowercase  :   Union[str, Any]						      =frozenset(["""image"""])

__lowercase  :   Any						      =frozenset(
    [
        """image""",
        """height""",
        """width""",
        """guidance_scale""",
    ]
)

__lowercase  :   Optional[Any]						      =frozenset(["""image"""])

__lowercase  :   List[Any]						      =frozenset(
    [
        """prompt""",
        """image""",
        """height""",
        """width""",
        """guidance_scale""",
        """negative_prompt""",
        """prompt_embeds""",
        """negative_prompt_embeds""",
    ]
)

__lowercase  :   int						      =frozenset(["""prompt""", """image""", """negative_prompt"""])

__lowercase  :   str						      =frozenset(
    [
        # Text guided image variation with an image mask
        """prompt""",
        """image""",
        """mask_image""",
        """height""",
        """width""",
        """guidance_scale""",
        """negative_prompt""",
        """prompt_embeds""",
        """negative_prompt_embeds""",
    ]
)

__lowercase  :   Union[str, Any]						      =frozenset(["""prompt""", """image""", """mask_image""", """negative_prompt"""])

__lowercase  :   str						      =frozenset(
    [
        # image variation with an image mask
        """image""",
        """mask_image""",
        """height""",
        """width""",
        """guidance_scale""",
    ]
)

__lowercase  :   List[Any]						      =frozenset(["""image""", """mask_image"""])

__lowercase  :   Union[str, Any]						      =frozenset(
    [
        """example_image""",
        """image""",
        """mask_image""",
        """height""",
        """width""",
        """guidance_scale""",
    ]
)

__lowercase  :   Union[str, Any]						      =frozenset(["""example_image""", """image""", """mask_image"""])

__lowercase  :   List[Any]						      =frozenset(["""class_labels"""])

__lowercase  :   Any						      =frozenset(["""class_labels"""])

__lowercase  :   Dict						      =frozenset(["""batch_size"""])

__lowercase  :   Optional[Any]						      =frozenset([])

__lowercase  :   Tuple						      =frozenset(["""batch_size"""])

__lowercase  :   Dict						      =frozenset([])

__lowercase  :   List[Any]						      =frozenset(
    [
        """prompt""",
        """audio_length_in_s""",
        """guidance_scale""",
        """negative_prompt""",
        """prompt_embeds""",
        """negative_prompt_embeds""",
        """cross_attention_kwargs""",
    ]
)

__lowercase  :   int						      =frozenset(["""prompt""", """negative_prompt"""])
__lowercase  :   List[Any]						      =frozenset(["""input_tokens"""])

__lowercase  :   Any						      =frozenset(["""input_tokens"""])











from __future__ import annotations




def     a__ (					lowercase__  ,    lowercase__  ):






   '''simple docstring'''






   UpperCAmelCase_						,       UpperCAmelCase_											=set(lowercase__  ), [start]

   while stack:
      UpperCAmelCase_											=stack.pop()
      explored.add(lowercase__  )
      # Differences from BFS:
      # 1) pop last element instead of first one
      # 2) add adjacent elements to stack without exploring them
      for adj in reversed(graph[v]  ):
         if adj not in explored:
            stack.append(lowercase__  )
   return explored


__lowercase  :   Dict						      ={
    """A""": ["""B""", """C""", """D"""],
    """B""": ["""A""", """D""", """E"""],
    """C""": ["""A""", """F"""],
    """D""": ["""B""", """D"""],
    """E""": ["""B""", """F"""],
    """F""": ["""C""", """E""", """G"""],
    """G""": ["""F"""],
}

if __name__ == "__main__":
     import doctest

     doctest.testmod()
     print(depth_first_search(G, """A"""))




