code: def find(self, keys, _index=0):
          
  
          if isinstance(keys, six.string_types):
              keys = re.split(r'[\.-]+', keys)
          if _index >= len(keys):
              return self
  
          key = keys[_index]
          if key in self.components:
              component = self.components[key]
              if isinstance(component, Assembly):
                  return component.find(keys, _index=(_index + 1))
              elif _index == len(keys) - 1:
                  # this is the last search key; component is a leaf, return it
                  return component
              else:
                  raise AssemblyFindError(
                      "could not find '%s' (invalid type at [%i]: %r)" % (
                          '.'.join(keys), _index, component
                      )
                  )
          else:
              raise AssemblyFindError(
                  "could not find '%s', '%s' is not a component of %r" % (
                      '.'.join(keys), key, self
                  )
              )
docs: :param keys: key path. ``'a.b'`` is equivalent to ``['a', 'b']``
          :type keys: :class:`str` or :class:`list`
  
          Find a nested :class:`Component` by a "`.`" separated list of names.
          for example::
  
              >>> motor.find('bearing.outer_ring')
  
          would return the Part instance of the motor bearing's outer ring.
  
          ::
  
              >>> bearing = motor.find('bearing')
              >>> ring = bearing.find('inner_ring')  # equivalent of 'bearing.inner_ring'
  
          the above code does much the same thing, ``bearing`` is an :class:`Assembly`,
          and ``ring`` is a :class:`Part`.
  
          .. note::
  
              For a key path of ``a.b.c`` the ``c`` key can referernce any
              :class:`Component` type.
  
              Everything prior (in this case ``a`` and ``b``) must reference an
              :class:`Assembly`.