def _simple_name(distribution):
simple_name = distribution.name<EOL>if simple_name.endswith('<STR_LIT:/>'):<EOL><INDENT>simple_name = simple_name.split('<STR_LIT:/>')[-<NUM_LIT:2>]<EOL><DEDENT>parts = simple_name.split('<STR_LIT:_>')<EOL>if parts[-<NUM_LIT:1>].isdigit():<EOL><INDENT>simple_name = '<STR_LIT:_>'.join(parts[:-<NUM_LIT:1>])<EOL><DEDENT>return simple_name<EOL>
Infer the original name passed into a distribution constructor.

    Distributions typically follow the pattern of
    with.name_scope(name) as name:
      super(name=name)
    so we attempt to reverse the name-scope transformation to allow
    addressing of RVs by the distribution's original, user-visible
    name kwarg.

    Args:
      distribution: a tfd.Distribution instance.
    Returns:
      simple_name: the original name passed into the Distribution.

    #### Example

    ```
    d1 = tfd.Normal(0., 1., name='x') # d1.name = 'x/'
    d2 = tfd.Normal(0., 1., name='x') # d2.name = 'x_2/'
    _simple_name(d2) # returns 'x'

    ```