@staticmethod<EOL><INDENT>def _compute_layer_name(is_defined_within_template, arn):<DEDENT>
<EOL>if is_defined_within_template:<EOL><INDENT>return arn<EOL><DEDENT>try:<EOL><INDENT>_, layer_name, layer_version = arn.rsplit('<STR_LIT::>', <NUM_LIT:2>)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise InvalidLayerVersionArn(arn + "<STR_LIT>")<EOL><DEDENT>return LayerVersion.LAYER_NAME_DELIMETER.join([layer_name,<EOL>layer_version,<EOL>hashlib.sha256(arn.encode('<STR_LIT:utf-8>')).hexdigest()[<NUM_LIT:0>:<NUM_LIT:10>]])<EOL>
Computes a unique name based on the LayerVersion Arn

Format:
<Name of the LayerVersion>-<Version of the LayerVersion>-<sha256 of 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
-------
str
    A unique name that represents the LayerVersion