<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getOperationName(id: str):
 """ This method returns the name representation of an operation given its value as used in the API """

    if isinstance(id, str):
        # Some graphene chains (e.g. steem) do not encode the
        # operation_type as id but in its string form
        assert id in operations.keys(), "Unknown operation {}".format(id)
        return id
    elif isinstance(id, int):
        return getOperationNameForId(id)
    else:
        raise ValueError