human
get value from enum by name.
assistant
Here is a Python function to get value from an enum by name

import enum

def get_value_from_enum(enum_class, name):
    """
    Gets value from enum by name.
    """
    return enum_class[name]

# Enter the enum
enum_class = enum.Enum("Enum", "A B C")

# Enter the name
name = "A"

# Calling the function
print((get_value_from_enum(enum_class, name)))

#Example Output
# Enum.A

#Remember to inspect code for bugs.