def METHOD_NAME(code_1: bytes, code_2: bytes) -> bool:
    """
    Compare code, removing swarm metadata if necessary
    :param code_1:
    :param code_2:
    :return: True if same code, False otherwise
    """
    if code_1 == code_2:
        return True
    else:
        codes = []
        for code in (code_1, code_2):
            try:
                codes.append(remove_swarm_metadata(code))
            except ValueError:
                codes.append(code)
        return codes[0] == codes[1]