You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: common.rb
    path of file: ./repos/solargraph/lib/solargraph/pin
    
    the code of the file until where you have to start completion: # frozen_string_literal
    
      def find_context
        here = closure
        until here.nil?
          if here.is_a?(Pin::Namespace)
            return here.return_type
          elsif here.is_a?(Pin::Method)
            if here.scope == :instance
              return ComplexType.try_parse(here.context.namespace)
            else
              return here.context
            end