@staticmethod<EOL><INDENT>def _compute_layer_version(is_defined_within_template, arn):<DEDENT>
if is_defined_within_template:<EOL><INDENT>return None<EOL><DEDENT>try:<EOL><INDENT>_, layer_version = arn.rsplit('<STR_LIT::>', <NUM_LIT:1>)<EOL>layer_version = int(layer_version)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise InvalidLayerVersionArn(arn + "<STR_LIT>")<EOL><DEDENT>return layer_version<EOL>
Parses out the Layer version from the arn

Parameters
----------
is_defined_within_template bool
    True if the resource is a Ref to a resource otherwise False
arn str
    ARN of the Resource

Returns
-------
int
    The Version of the LayerVersion